net: Remove redundant oif checks in rt6_device_match
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by David Ahern <[email protected]>
--- net/ipv6/route.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
net/ipv6/route.c +3 -3
@@ -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;
Signature · 1 line
2.3.8 (Apple Git-58)
David Miller
maintainerFrom: David Ahern <[email protected]>
Date: Fri, 25 Sep 2015 15:22:54 -0600
Quoted 5 lines
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 <[email protected]>Signed-off-by David Ahern <[email protected]>
Looks good, applied, thanks.