netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ian Morris <ipm@chirality.org.uk>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH nf-next 0/7] coding style improvements for netfilter
Date: Wed, 14 Oct 2015 12:40:28 +0200	[thread overview]
Message-ID: <20151014104028.GA13671@salvia> (raw)
In-Reply-To: <1444581140-6255-1-git-send-email-ipm@chirality.org.uk>

On Sun, Oct 11, 2015 at 05:32:13PM +0100, Ian Morris wrote:
> This series of patches improves the coding style of the netfilter-ipv6 
> code by addressing some issues detected by checkpatch.
> 
> The changes were previously submitted as part of a larger monolithic 
> patch but on advice from Pablo, these are being re-sent in smaller, 
> more structured batches.

Applied with minor changes. Thanks.

--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -117,7 +117,7 @@ ip6_packet_match(const struct sk_buff *skb,
        if (FWINV(ret != 0, IP6T_INV_VIA_IN)) {
                dprintf("VIA in mismatch (%s vs %s).%s\n",
                        indev, ip6info->iniface,
-                       ip6info->invflags&IP6T_INV_VIA_IN ?" (INV)":"");
+                       ip6info->invflags&IP6T_INV_VIA_IN ? " (INV)" :
"");
                return false;
        }


I have updated this to:

+                       ip6info->invflags & IP6T_INV_VIA_IN ? " (INV)" :
                                         ^ ^

checkpatch was complaining, and given that we were already updating
this line...

@@ -151,7 +151,7 @@ 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;

Removed the unnecessary brackets for single statement in the if
branch above. It just added one extra line removal to the patch.

      parent reply	other threads:[~2015-10-14 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11 16:32 [PATCH nf-next 0/7] coding style improvements for netfilter Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 1/7] netfilter-ipv6: label placement Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 2/7] netfilter-ipv6: function definition layout Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 3/7] netfilter-ipv6: code indentation Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 4/7] netfilter-ipv6: whitespace around operators Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 5/7] netfilter-ipv6: ternary operator layout Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 6/7] netfilter-ipv6: improve if statements Ian Morris
2015-10-11 16:32 ` [PATCH nf-next 7/7] netfilter-ipv6: pointer cast layout Ian Morris
2015-10-14 10:40 ` Pablo Neira Ayuso [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=20151014104028.GA13671@salvia \
    --to=pablo@netfilter.org \
    --cc=ipm@chirality.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@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).