[PATCH] ipv4: Remove redundant assignment

Subsystems: networking [general], networking [ipv4/ipv6], the rest

STALE5136d

2 messages, 2 authors, 2012-07-23 · open the first message on its own page

[PATCH] ipv4: Remove redundant assignment

From: Lin Ming <hidden>
Date: 2012-07-23 14:12:03

It is redundant to set no_addr and accept_local to 0 and then set them
with other values just after that.

Signed-off-by: Lin Ming <redacted>
---
 net/ipv4/fib_frontend.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index f277cf0..8732cc7 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -258,7 +258,6 @@ static int __fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst,
 	fl4.flowi4_tos = tos;
 	fl4.flowi4_scope = RT_SCOPE_UNIVERSE;
 
-	no_addr = accept_local = 0;
 	no_addr = idev->ifa_list == NULL;
 
 	accept_local = IN_DEV_ACCEPT_LOCAL(idev);

Re: [PATCH] ipv4: Remove redundant assignment

From: David Miller <davem@davemloft.net>
Date: 2012-07-23 20:09:40

From: Lin Ming <redacted>
Date: Mon, 23 Jul 2012 22:11:21 +0800
It is redundant to set no_addr and accept_local to 0 and then set them
with other values just after that.

Signed-off-by: Lin Ming <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help