[PATCH] netfilter: fix indent on in statements

Subsystems: ethernet bridge, networking [general], the rest

STALE3354d

4 messages, 3 authors, 2017-08-15 · open the first message on its own page

[PATCH] netfilter: fix indent on in statements

From: Colin King <hidden>
Date: 2017-08-15 06:50:39

From: Colin Ian King <redacted>

The returns on some if statements are not indented correctly,
add in the missing tab.

Signed-off-by: Colin Ian King <redacted>
---
 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;
 		}
 		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,
-- 
2.11.0

Re: [PATCH] netfilter: fix indent on in statements

From: walter harms <hidden>
Date: 2017-08-15 07:26:57


Am 15.08.2017 08:50, schrieb Colin King:
quoted hunk
From: Colin Ian King <redacted>

The returns on some if statements are not indented correctly,
add in the missing tab.

Signed-off-by: Colin Ian King <redacted>
---
 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
quoted hunk
 		}
 		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,

Re: [PATCH] netfilter: fix indent on in statements

From: Sergei Shtylyov <hidden>
Date: 2017-08-15 09:45:43

Hello!

On 8/15/2017 9:50 AM, Colin King wrote:
From: Colin Ian King <redacted>

The returns on some if statements are not indented correctly,
   s/in/if/ in the subject?
add in the missing tab.

Signed-off-by: Colin Ian King <redacted>
[...]

MBR, Sergei

Re: [PATCH] netfilter: fix indent on in statements

From: Colin Ian King <hidden>
Date: 2017-08-15 09:51:21

On 15/08/17 10:45, Sergei Shtylyov wrote:
Hello!

On 8/15/2017 9:50 AM, Colin King wrote:
quoted
From: Colin Ian King <redacted>

The returns on some if statements are not indented correctly,
   s/in/if/ in the subject?
Doh, fix resent.
quoted
add in the missing tab.

Signed-off-by: Colin Ian King <redacted>
[...]

MBR, Sergei
-- 
To unsubscribe from this list: send the line "unsubscribe
kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help