On Tue, 2014-03-18 at 21:35 -0700, Eric Dumazet wrote:
> On Tue, 2014-03-18 at 20:42 -0700, Joe Perches wrote:
> > On Tue, 2014-03-18 at 20:32 -0700, Eric Dumazet wrote:
> > > On Tue, 2014-03-18 at 21:19 -0600, Jean Sacren wrote:
> > > 
> > > > 2) Fix the initializer by deleting the double logical negation
> > > >    operators as they don't serve any purpose.
> > > > 
> > > ...
> > > >  
> > > >  static int phy_set_lbt(struct wpan_phy *phy, struct genl_info *info)
> > > >  {
> > > > -       u8 on = !!nla_get_u8(info->attrs[IEEE802154_ATTR_LBT_ENABLED]);
> > > 
> > > You do realize !!(a) is not equivalent to (a) ?
> > 
> > It is when the type it's assigned to also changes
> > from u8 to bool.
> 
> I was referring to the changelog, obviously, see how I carefully
> copy/pasted the relevant part ?

No, that's not obvious at all actually.

I would have used "Change the type to bool and remove
the now unnecessary !!" in the changelog to link Jean's
points 1 and 2, but your statement and the code and
commit log changes proposed by Jean don't match.

The type _did_ change as described in point 1.

> Stating it is a 'fix' is quite a false statement, I see no fix at all,
> maybe a cleanup, but I am not really convinced.

Perhaps "fix" is a more flexible word than you imagine.
Perhaps this a code style "fix" without logic change.

<shrug>  I'm very ambivalent about it too.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to