summaryrefslogtreecommitdiff
path: root/net/ipv6/anycast.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-03-31 20:51:59 +0300
committerDavid S. Miller <davem@davemloft.net>2015-03-31 20:51:59 +0300
commit1695fb46eb5880dae70b4940a7d6bdf6e276104d (patch)
treec314553dc093f5226913a247c36c03012f7d22d7 /net/ipv6/anycast.c
parentbc48878c06028f297e4fdf75be7dda88de050430 (diff)
parent53b24b8f94cb15e38e332db82177cf3f0f4df0c5 (diff)
downloadlinux-1695fb46eb5880dae70b4940a7d6bdf6e276104d.tar.xz
Merge branch 'ipv6_null'
Ian Morris says: ==================== ipv6: coding style - comparisons with NULL The following patches address some coding style issues only. No functional changes and no changes detected by objdiff. The IPV6 code uses multiple different styles when comparing with NULL (I.e. x == NULL and !x as well as x != NULL and x). Generally the latter form is preferred according to checkpatch and so this changes aligns the code to this style. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r--net/ipv6/anycast.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 9e6b0ee563f0..514ac259f543 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -70,7 +70,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
return -EINVAL;
pac = sock_kmalloc(sk, sizeof(struct ipv6_ac_socklist), GFP_KERNEL);
- if (pac == NULL)
+ if (!pac)
return -ENOMEM;
pac->acl_next = NULL;
pac->acl_addr = *addr;
@@ -93,7 +93,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, const struct in6_addr *addr)
} else
dev = __dev_get_by_index(net, ifindex);
- if (dev == NULL) {
+ if (!dev) {
err = -ENODEV;
goto error;
}
@@ -222,7 +222,7 @@ static struct ifacaddr6 *aca_alloc(struct rt6_info *rt,
struct ifacaddr6 *aca;
aca = kzalloc(sizeof(*aca), GFP_ATOMIC);
- if (aca == NULL)
+ if (!aca)
return NULL;
aca->aca_addr = *addr;
@@ -268,7 +268,7 @@ int __ipv6_dev_ac_inc(struct inet6_dev *idev, const struct in6_addr *addr)
goto out;
}
aca = aca_alloc(rt, addr);
- if (aca == NULL) {
+ if (!aca) {
ip6_rt_put(rt);
err = -ENOMEM;
goto out;
@@ -337,7 +337,7 @@ static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr)
{
struct inet6_dev *idev = __in6_dev_get(dev);
- if (idev == NULL)
+ if (!idev)
return -ENODEV;
return __ipv6_dev_ac_dec(idev, addr);
}