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/ipv6/addrconf.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/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 522bdc77206c..b1ce8fc62049 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4498,7 +4498,7 @@ static int addrconf_init_net(struct net *net) | |||
4498 | all = &ipv6_devconf; | 4498 | all = &ipv6_devconf; |
4499 | dflt = &ipv6_devconf_dflt; | 4499 | dflt = &ipv6_devconf_dflt; |
4500 | 4500 | ||
4501 | if (net != &init_net) { | 4501 | if (!net_eq(net, &init_net)) { |
4502 | all = kmemdup(all, sizeof(ipv6_devconf), GFP_KERNEL); | 4502 | all = kmemdup(all, sizeof(ipv6_devconf), GFP_KERNEL); |
4503 | if (all == NULL) | 4503 | if (all == NULL) |
4504 | goto err_alloc_all; | 4504 | goto err_alloc_all; |
@@ -4546,7 +4546,7 @@ static void addrconf_exit_net(struct net *net) | |||
4546 | __addrconf_sysctl_unregister(net->ipv6.devconf_dflt); | 4546 | __addrconf_sysctl_unregister(net->ipv6.devconf_dflt); |
4547 | __addrconf_sysctl_unregister(net->ipv6.devconf_all); | 4547 | __addrconf_sysctl_unregister(net->ipv6.devconf_all); |
4548 | #endif | 4548 | #endif |
4549 | if (net != &init_net) { | 4549 | if (!net_eq(net, &init_net)) { |
4550 | kfree(net->ipv6.devconf_dflt); | 4550 | kfree(net->ipv6.devconf_dflt); |
4551 | kfree(net->ipv6.devconf_all); | 4551 | kfree(net->ipv6.devconf_all); |
4552 | } | 4552 | } |