From: walter harms <wharms@bfs.de>
To: Colin King <colin.king@canonical.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
Stephen Hemminger <stephen@networkplumber.org>,
"David S . Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
bridge@lists.linux-foundation.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfilter: fix indent on in statements
Date: Tue, 15 Aug 2017 09:26:49 +0200 [thread overview]
Message-ID: <5992A239.5080600@bfs.de> (raw)
In-Reply-To: <20170815065025.18471-1-colin.king@canonical.com>
Am 15.08.2017 08:50, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> The returns on some if statements are not indented correctly,
> add in the missing tab.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> net/bridge/netfilter/ebt_ip.c | 4 ++--
> net/bridge/netfilter/ebt_ip6.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c
> index d06968bdf5ec..2b46c50abce0 100644
> --- a/net/bridge/netfilter/ebt_ip.c
> +++ b/net/bridge/netfilter/ebt_ip.c
> @@ -64,14 +64,14 @@ ebt_ip_mt(const struct sk_buff *skb, struct xt_action_param *par)
> if (NF_INVF(info, EBT_IP_DPORT,
> dst < info->dport[0] ||
> dst > info->dport[1]))
> - return false;
> + return false;
This is hard to read, perhaps it gets better when the result is stored in a tmp-var.
something like:
int isbetween=dst < info->dport[0] ||dst > info->dport[1] ;
int state=NF_INVF(info, EBT_IP_DPORT, isbetween );
if ( state )
return false;
just my 2 cents,
re,
wh
> }
> if (info->bitmask & EBT_IP_SPORT) {
> u32 src = ntohs(pptr->src);
> if (NF_INVF(info, EBT_IP_SPORT,
> src < info->sport[0] ||
> src > info->sport[1]))
> - return false;
> + return false;
> }
> }
> return true;
> diff --git a/net/bridge/netfilter/ebt_ip6.c b/net/bridge/netfilter/ebt_ip6.c
> index 4617491be41e..2a5a52a53ec4 100644
> --- a/net/bridge/netfilter/ebt_ip6.c
> +++ b/net/bridge/netfilter/ebt_ip6.c
> @@ -89,7 +89,7 @@ ebt_ip6_mt(const struct sk_buff *skb, struct xt_action_param *par)
> if (NF_INVF(info, EBT_IP6_SPORT,
> src < info->sport[0] ||
> src > info->sport[1]))
> - return false;
> + return false;
> }
> if ((info->bitmask & EBT_IP6_ICMP6) &&
> NF_INVF(info, EBT_IP6_ICMP6,
next prev parent reply other threads:[~2017-08-15 7:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 6:50 [PATCH] netfilter: fix indent on in statements Colin King
2017-08-15 7:26 ` walter harms [this message]
2017-08-15 9:45 ` Sergei Shtylyov
2017-08-15 9:51 ` Colin Ian King
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=5992A239.5080600@bfs.de \
--to=wharms@bfs.de \
--cc=bridge@lists.linux-foundation.org \
--cc=colin.king@canonical.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=stephen@networkplumber.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).