* [PATCH net-next] net: Remove redundant oif checks in rt6_device_match
@ 2015-09-25 21:22 David Ahern
2015-09-29 5:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2015-09-25 21:22 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji, David Ahern
The oif has already been checked that it is non-zero; the 2 additional
checks on oif within that if (oif) {...} block are redundant.
CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
---
net/ipv6/route.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 118f8fa1a809..934dd9c6aa86 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -474,10 +474,10 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
if (dev->flags & IFF_LOOPBACK) {
if (!sprt->rt6i_idev ||
sprt->rt6i_idev->dev->ifindex != oif) {
- if (flags & RT6_LOOKUP_F_IFACE && oif)
+ if (flags & RT6_LOOKUP_F_IFACE)
continue;
- if (local && (!oif ||
- local->rt6i_idev->dev->ifindex == oif))
+ if (local &&
+ local->rt6i_idev->dev->ifindex == oif)
continue;
}
local = sprt;
--
2.3.8 (Apple Git-58)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: Remove redundant oif checks in rt6_device_match
2015-09-25 21:22 [PATCH net-next] net: Remove redundant oif checks in rt6_device_match David Ahern
@ 2015-09-29 5:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-29 5:30 UTC (permalink / raw)
To: dsa; +Cc: netdev, yoshfuji
From: David Ahern <dsa@cumulusnetworks.com>
Date: Fri, 25 Sep 2015 15:22:54 -0600
> The oif has already been checked that it is non-zero; the 2 additional
> checks on oif within that if (oif) {...} block are redundant.
>
> CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Looks good, applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-29 5:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 21:22 [PATCH net-next] net: Remove redundant oif checks in rt6_device_match David Ahern
2015-09-29 5:30 ` David Miller
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).