From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Joe Perches <joe@perches.com>, Ian Morris <ipm@chirality.org.uk>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/6] ipv6: netfilter: remove unnecessary braces
Date: Sat, 25 Apr 2015 19:54:10 +0300 [thread overview]
Message-ID: <553BC6B2.5080807@cogentembedded.com> (raw)
In-Reply-To: <1429977542.32250.12.camel@perches.com>
Hello.
On 04/25/2015 06:59 PM, Joe Perches wrote:
>> Remove braces from a few if statements where not required.
> trivia:
>> diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
> []
>> @@ -151,9 +151,8 @@ ip6_packet_match(const struct sk_buff *skb,
>> ip6info->proto);
>>
>> if (ip6info->proto == protohdr) {
>> - if (ip6info->invflags & IP6T_INV_PROTO) {
>> + if (ip6info->invflags & IP6T_INV_PROTO)
>> return false;
>> - }
>> return true;
> maybe
> return (!(ip6info->invflags & IP6T_INV_PROTO));
Parens around the *return* expression are not necessary. :-)
WBR, Sergei
next prev parent reply other threads:[~2015-04-25 16:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 9:26 [PATCH net-next 0/6] ipv6: netfilter - coding style improvements Ian Morris
2015-04-25 9:26 ` [PATCH net-next 1/6] ipv6: netfilter: Tidy up indenting Ian Morris
2015-04-25 9:26 ` [PATCH net-next 2/6] ipv6: netfilter: whitespace in line layouts Ian Morris
2015-04-25 15:57 ` Joe Perches
2015-04-25 9:26 ` [PATCH net-next 3/6] ipv6: netfilter: remove unnecessary braces Ian Morris
2015-04-25 15:59 ` Joe Perches
2015-04-25 16:54 ` Sergei Shtylyov [this message]
2015-04-25 17:01 ` Joe Perches
2015-04-25 9:26 ` [PATCH net-next 4/6] ipv6: netfilter: comparison for equality with NULL Ian Morris
2015-04-25 9:26 ` [PATCH net-next 5/6] ipv6: netfilter: comparison for inequality " Ian Morris
2015-04-25 9:27 ` [PATCH net-next 6/6] ipv6: netfilter: simply if-else statements Ian Morris
2015-04-25 16:17 ` Joe Perches
2015-04-27 2:43 ` [PATCH net-next 0/6] ipv6: netfilter - coding style improvements Pablo Neira Ayuso
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=553BC6B2.5080807@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=ipm@chirality.org.uk \
--cc=joe@perches.com \
--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).