Ack from me, code review only.
Thanks, Praveen On 29-Apr-15 5:50 PM, Anders Widell wrote: > osaf/services/saf/amf/amfnd/susm.cc | 12 ++++-------- > 1 files changed, 4 insertions(+), 8 deletions(-) > > > The following warning was fixed by replacing the case statement with an if > statement: > > susm.cc: In function 'uint32_t avnd_evt_avd_su_pres_evh(AVND_CB*, AVND_EVT*)': > susm.cc:1237:26: error: switch condition has type bool [-Werror=switch-bool] > switch (info->term_state) { > ^ > > diff --git a/osaf/services/saf/amf/amfnd/susm.cc > b/osaf/services/saf/amf/amfnd/susm.cc > --- a/osaf/services/saf/amf/amfnd/susm.cc > +++ b/osaf/services/saf/amf/amfnd/susm.cc > @@ -1234,8 +1234,7 @@ uint32_t avnd_evt_avd_su_pres_evh(AVND_C > goto done; > } > > - switch (info->term_state) { > - case true: /* => terminate the su */ > + if (info->term_state) { /* => terminate the su */ > /* Stop saAmfSGSuRestartProb timer if started */ > if (su->su_err_esc_level == AVND_ERR_ESC_LEVEL_1) { > tmr_su_err_esc_stop(cb, su); > @@ -1269,9 +1268,7 @@ uint32_t avnd_evt_avd_su_pres_evh(AVND_C > if (NCSCC_RC_SUCCESS != rc) > goto done; > } > - break; > - > - case false: /* => instantiate the su */ > + } else { /* => instantiate the su */ > TRACE("SU term state is set to false"); > /* Reset admn term operation flag */ > m_AVND_SU_ADMN_TERM_RESET(su); > @@ -1299,7 +1296,7 @@ uint32_t avnd_evt_avd_su_pres_evh(AVND_C > /* Will transition to instantiation-failed when > instantiated */ > LOG_ER("'%s':FAILED", __FUNCTION__); > rc = NCSCC_RC_FAILURE; > - break; > + goto done; > } > /* trigger su instantiation for pi su */ > if (m_AVND_SU_IS_PREINSTANTIABLE(su)) { > @@ -1315,8 +1312,7 @@ uint32_t avnd_evt_avd_su_pres_evh(AVND_C > } else > osafassert(0); > } > - break; > - } /* switch */ > + } > > done: > TRACE_LEAVE2("%u", rc); > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel