summaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2015-09-25 23:22:54 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-29 07:30:24 +0200
commit17fb0b2b90568182bc969cbe0d76fa07079267e4 (patch)
treee5cd9db6ddfa5dc989e37baa87671af97f2c9f71 /net/ipv6/route.c
parentlan78xx: Return 0 when lan78xx_suspend() has no error. (diff)
downloadlinux-17fb0b2b90568182bc969cbe0d76fa07079267e4.tar.xz
linux-17fb0b2b90568182bc969cbe0d76fa07079267e4.zip
net: Remove redundant oif checks in rt6_device_match
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6fbf6fdde7e7..66a6b2c485dd 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;