I believe you should not mix styles, explicitly checking is the main style here. Thus if the variable is bool you should explicitly check for true or false. Personally I think the "!" operator creates less readable code We could write this up for AMF extra design rules /Hans
> -----Original Message----- > From: Anders Björnerstedt > Sent: den 14 januari 2014 13:54 > To: Hans Feldt; Hans Nordebäck; [email protected]; > [email protected] > Cc: [email protected] > Subject: RE: [PATCH 1 of 4] amfd: use bool instead of SaBoolT [#713] > > Or just > > if (!avnd->node_info.member) > > :-) > /AndersBj > > -----Original Message----- > From: Hans Feldt [mailto:[email protected]] > Sent: den 14 januari 2014 13:49 > To: Hans Nordebäck; [email protected]; [email protected] > Cc: [email protected] > Subject: Re: [devel] [PATCH 1 of 4] amfd: use bool instead of SaBoolT [#713] > > Ack but you could change: > > diff --git a/osaf/services/saf/amf/amfd/ndfsm.cc > b/osaf/services/saf/amf/amfd/ndfsm.cc > --- a/osaf/services/saf/amf/amfd/ndfsm.cc > +++ b/osaf/services/saf/amf/amfd/ndfsm.cc > @@ -79,7 +79,7 @@ void avd_node_up_evh(AVD_CL_CB *cb, AVD_ > avnd->adest = n2d_msg->msg_info.n2d_node_up.adest_address; > avnd->rcv_msg_id = n2d_msg->msg_info.n2d_node_up.msg_id; > > - if (avnd->node_info.member != SA_TRUE) { > + if (avnd->node_info.member != true) { > LOG_WA("Not a Cluster Member dropping the msg"); > goto done; > } > > To ( ... member == false) > > Thanks, > Hans ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
