diff options
author | Octavian Purdila <opurdila@ixiacom.com> | 2009-11-25 18:14:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-25 18:14:13 -0500 |
commit | 09ad9bc752519cc167d0a573e1acf69b5c707c67 (patch) | |
tree | 0e190a9ffb90d7e0534136c3e9f31dce02f423c3 /net/ipv4/route.c | |
parent | 4ba3eb034fb6fd1990ccc5a6d71d5abcda37b905 (diff) |
net: use net_eq to compare nets
Generated with the following semantic patch
@@
struct net *n1;
struct net *n2;
@@
- n1 == n2
+ net_eq(n1, n2)
@@
struct net *n1;
struct net *n2;
@@
- n1 != n2
+ !net_eq(n1, n2)
applied over {include,net,drivers/net}.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 7547944ea9bf..aea7bb369cfa 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -703,7 +703,7 @@ static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) | |||
703 | 703 | ||
704 | static inline int compare_netns(struct rtable *rt1, struct rtable *rt2) | 704 | static inline int compare_netns(struct rtable *rt1, struct rtable *rt2) |
705 | { | 705 | { |
706 | return dev_net(rt1->u.dst.dev) == dev_net(rt2->u.dst.dev); | 706 | return net_eq(dev_net(rt1->u.dst.dev), dev_net(rt2->u.dst.dev)); |
707 | } | 707 | } |
708 | 708 | ||
709 | static inline int rt_is_expired(struct rtable *rth) | 709 | static inline int rt_is_expired(struct rtable *rth) |
@@ -3310,7 +3310,7 @@ static __net_init int sysctl_route_net_init(struct net *net) | |||
3310 | struct ctl_table *tbl; | 3310 | struct ctl_table *tbl; |
3311 | 3311 | ||
3312 | tbl = ipv4_route_flush_table; | 3312 | tbl = ipv4_route_flush_table; |
3313 | if (net != &init_net) { | 3313 | if (!net_eq(net, &init_net)) { |
3314 | tbl = kmemdup(tbl, sizeof(ipv4_route_flush_table), GFP_KERNEL); | 3314 | tbl = kmemdup(tbl, sizeof(ipv4_route_flush_table), GFP_KERNEL); |
3315 | if (tbl == NULL) | 3315 | if (tbl == NULL) |
3316 | goto err_dup; | 3316 | goto err_dup; |