From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>, netdev@vger.kernel.org
Subject: Re: [PATCH net] netlink: fix boolean evaluation on bound
Date: Mon, 14 Dec 2015 22:07:04 +0100 [thread overview]
Message-ID: <566F2F78.8020705@stressinduktion.org> (raw)
In-Reply-To: <1450115411.8474.3.camel@edumazet-glaptop2.roam.corp.google.com>
On 14.12.2015 18:50, Eric Dumazet wrote:
> On Mon, 2015-12-14 at 18:27 +0100, Hannes Frederic Sowa wrote:
>
>> Otherwise I would recommend adding a "!!" to express that we actually
>> want bound set based on the portid value?
>
> Note that compiler already does the !! thing, when you store an integer
> into a bool var.
Exactly, the gcc compiler does that automatically when writing to a
_Bool type.
> So it definitely is a matter of taste and code readability.
Yes, as I wrote, this patch doesn't alter the any runtime behavior, it
confused me and thus I wanted to make the assignment more explicit.
It looked like a trap to me, thus I wanted to change it.
Bye,
Hannes
prev parent reply other threads:[~2015-12-14 21:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 16:55 [PATCH net] netlink: fix boolean evaluation on bound Hannes Frederic Sowa
2015-12-14 17:06 ` Herbert Xu
2015-12-14 17:27 ` Hannes Frederic Sowa
2015-12-14 17:50 ` Eric Dumazet
2015-12-14 21:07 ` Hannes Frederic Sowa [this message]
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=566F2F78.8020705@stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).