[devel] [PATCH 1 of 1] amfnd: cppcheck warnings with severity error [#1642]
osaf/services/saf/amf/amfnd/cbq.cc | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/osaf/services/saf/amf/amfnd/cbq.cc b/osaf/services/saf/amf/amfnd/cbq.cc --- a/osaf/services/saf/amf/amfnd/cbq.cc +++ b/osaf/services/saf/amf/amfnd/cbq.cc @@ -599,8 +599,7 @@ uint32_t avnd_evt_tmr_cbk_resp_evh(AVND_ } /* treat it as comp failure (determine the recommended recovery) */ if (AVSV_AMF_HC == rec->cbk_info->type) { - AVND_COMP_HC_REC tmp_hc_rec; - memset(&tmp_hc_rec, '\0', sizeof(AVND_COMP_HC_REC)); + AVND_COMP_HC_REC tmp_hc_rec = {}; tmp_hc_rec.key = rec->cbk_info->param.hc.hc_key; tmp_hc_rec.req_hdl = rec->cbk_info->hdl; hc_rec = m_AVND_COMPDB_REC_HC_GET(*(rec->comp), tmp_hc_rec); -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1 of 1] amfnd: cppcheck warnings with severity error [#1642]
Ack, Thanks, Minh On 29/08/16 16:25, Long HB Nguyen wrote: > osaf/services/saf/amf/amfnd/cbq.cc | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > > diff --git a/osaf/services/saf/amf/amfnd/cbq.cc > b/osaf/services/saf/amf/amfnd/cbq.cc > --- a/osaf/services/saf/amf/amfnd/cbq.cc > +++ b/osaf/services/saf/amf/amfnd/cbq.cc > @@ -599,8 +599,7 @@ uint32_t avnd_evt_tmr_cbk_resp_evh(AVND_ > } > /* treat it as comp failure (determine the recommended > recovery) */ > if (AVSV_AMF_HC == rec->cbk_info->type) { > - AVND_COMP_HC_REC tmp_hc_rec; > - memset(&tmp_hc_rec, '\0', sizeof(AVND_COMP_HC_REC)); > + AVND_COMP_HC_REC tmp_hc_rec = {}; > tmp_hc_rec.key = rec->cbk_info->param.hc.hc_key; > tmp_hc_rec.req_hdl = rec->cbk_info->hdl; > hc_rec = m_AVND_COMPDB_REC_HC_GET(*(rec->comp), > tmp_hc_rec); > -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
Re: [devel] [PATCH 1 of 1] amfnd: cppcheck warnings with severity error [#1642]
ack, code review only/Thanks HansN On 08/29/2016 08:25 AM, Long HB Nguyen wrote: > osaf/services/saf/amf/amfnd/cbq.cc | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > > diff --git a/osaf/services/saf/amf/amfnd/cbq.cc > b/osaf/services/saf/amf/amfnd/cbq.cc > --- a/osaf/services/saf/amf/amfnd/cbq.cc > +++ b/osaf/services/saf/amf/amfnd/cbq.cc > @@ -599,8 +599,7 @@ uint32_t avnd_evt_tmr_cbk_resp_evh(AVND_ > } > /* treat it as comp failure (determine the recommended > recovery) */ > if (AVSV_AMF_HC == rec->cbk_info->type) { > - AVND_COMP_HC_REC tmp_hc_rec; > - memset(&tmp_hc_rec, '\0', sizeof(AVND_COMP_HC_REC)); > + AVND_COMP_HC_REC tmp_hc_rec = {}; > tmp_hc_rec.key = rec->cbk_info->param.hc.hc_key; > tmp_hc_rec.req_hdl = rec->cbk_info->hdl; > hc_rec = m_AVND_COMPDB_REC_HC_GET(*(rec->comp), > tmp_hc_rec); -- ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel