From: Jean Sacren <sakiwit@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Joe Perches <joe@perches.com>,
Alexander Smirnov <alex.bluesman.smirnov@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Subject: Re: [PATCH net-next] ieee802154: fix variable declaration and initializer
Date: Tue, 18 Mar 2014 22:56:34 -0600 [thread overview]
Message-ID: <20140319045634.GB1448@mail.gmail.com> (raw)
In-Reply-To: <1395203754.9114.54.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 18 Mar 2014 21:35:54 -0700
>
> 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 ?
>
> 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.
Stating it is a "fix" is not a false statement at all. !! falsely
changes the value to be int TWICE for nothing! Are you still not
convinced?
--
Jean Sacren
next prev parent reply other threads:[~2014-03-19 5:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 3:19 [PATCH net-next] ieee802154: fix variable declaration and initializer Jean Sacren
[not found] ` <1395199198-14310-1-git-send-email-sakiwit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-19 3:32 ` Eric Dumazet
2014-03-19 3:42 ` Joe Perches
2014-03-19 4:35 ` Eric Dumazet
2014-03-19 4:56 ` Jean Sacren [this message]
[not found] ` <20140319045634.GB1448-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-19 5:11 ` Joe Perches
2014-03-19 5:13 ` Eric Dumazet
2014-03-19 5:11 ` Joe Perches
2014-03-19 4:31 ` Jean Sacren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140319045634.GB1448@mail.gmail.com \
--to=sakiwit@gmail.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=joe@perches.com \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=phoebe.buckheister@itwm.fraunhofer.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.