Netdev List
 help / color / mirror / Atom feed
From: Lin Zhang <xiaolou4617@gmail.com>
To: pablo@netfilter.org, kadlec@blackhole.kfki.hu, fw@strlen.de,
	davem@davemloft.net
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, Lin Zhang <xiaolou4617@gmail.com>
Subject: [PATCH] net: netfilter: fix coding style
Date: Tue,  5 Dec 2017 15:34:09 +0800	[thread overview]
Message-ID: <1512459249-857-1-git-send-email-xiaolou4617@gmail.com> (raw)

I think use variable 'min' instead of number '1024' is better.

Signed-off-by: Lin Zhang <xiaolou4617@gmail.com>
---
 net/netfilter/nf_nat_proto_common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/netfilter/nf_nat_proto_common.c b/net/netfilter/nf_nat_proto_common.c
index fbce552..e87e683 100644
--- a/net/netfilter/nf_nat_proto_common.c
+++ b/net/netfilter/nf_nat_proto_common.c
@@ -67,7 +67,7 @@ void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto,
 			}
 		} else {
 			min = 1024;
-			range_size = 65535 - 1024 + 1;
+			range_size = 65535 - min + 1;
 		}
 	} else {
 		min = ntohs(range->min_proto.all);
-- 
1.7.1


                 reply	other threads:[~2017-12-05  7:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1512459249-857-1-git-send-email-xiaolou4617@gmail.com \
    --to=xiaolou4617@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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