diff options
author | Ian Morris <ipm@chirality.org.uk> | 2015-03-29 16:00:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-31 20:51:54 +0300 |
commit | 63159f29be1df7f93563a8a0f78c5e65fc844ed6 (patch) | |
tree | aba1b4275abb0692728b97851f2d52e07d3f6e94 /net/ipv6/af_inet6.c | |
parent | bc48878c06028f297e4fdf75be7dda88de050430 (diff) | |
download | linux-63159f29be1df7f93563a8a0f78c5e65fc844ed6.tar.xz |
ipv6: coding style: comparison for equality with NULL
The ipv6 code uses a mixture of coding styles. In some instances check for NULL
pointer is done as x == NULL and sometimes as !x. !x is preferred according to
checkpatch and this patch makes the code consistent by adopting the latter
form.
No changes detected by objdiff.
Signed-off-by: Ian Morris <ipm@chirality.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index d8dcc526339e..0e4889736a87 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -164,11 +164,11 @@ lookup_protocol: answer_flags = answer->flags; rcu_read_unlock(); - WARN_ON(answer_prot->slab == NULL); + WARN_ON(!answer_prot->slab); err = -ENOBUFS; sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot); - if (sk == NULL) + if (!sk) goto out; sock_init_data(sock, sk); @@ -391,7 +391,7 @@ int inet6_release(struct socket *sock) { struct sock *sk = sock->sk; - if (sk == NULL) + if (!sk) return -EINVAL; /* Free mc lists */ @@ -640,7 +640,7 @@ int inet6_sk_rebuild_header(struct sock *sk) dst = __sk_dst_check(sk, np->dst_cookie); - if (dst == NULL) { + if (!dst) { struct inet_sock *inet = inet_sk(sk); struct in6_addr *final_p, final; struct flowi6 fl6; |