diff options
author | Ian Morris <ipm@chirality.org.uk> | 2015-03-29 09:00:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-31 13:51:54 -0400 |
commit | 53b24b8f94cb15e38e332db82177cf3f0f4df0c5 (patch) | |
tree | c314553dc093f5226913a247c36c03012f7d22d7 /net/ipv6/raw.c | |
parent | 63159f29be1df7f93563a8a0f78c5e65fc844ed6 (diff) |
ipv6: coding style: comparison for inequality 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/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index e33576df4658..79ccdb4c1b33 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -367,7 +367,7 @@ void raw6_icmp_error(struct sk_buff *skb, int nexthdr, | |||
367 | 367 | ||
368 | read_lock(&raw_v6_hashinfo.lock); | 368 | read_lock(&raw_v6_hashinfo.lock); |
369 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); | 369 | sk = sk_head(&raw_v6_hashinfo.ht[hash]); |
370 | if (sk != NULL) { | 370 | if (sk) { |
371 | /* Note: ipv6_hdr(skb) != skb->data */ | 371 | /* Note: ipv6_hdr(skb) != skb->data */ |
372 | const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data; | 372 | const struct ipv6hdr *ip6h = (const struct ipv6hdr *)skb->data; |
373 | saddr = &ip6h->saddr; | 373 | saddr = &ip6h->saddr; |
@@ -1130,7 +1130,7 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg) | |||
1130 | 1130 | ||
1131 | spin_lock_bh(&sk->sk_receive_queue.lock); | 1131 | spin_lock_bh(&sk->sk_receive_queue.lock); |
1132 | skb = skb_peek(&sk->sk_receive_queue); | 1132 | skb = skb_peek(&sk->sk_receive_queue); |
1133 | if (skb != NULL) | 1133 | if (skb) |
1134 | amount = skb_tail_pointer(skb) - | 1134 | amount = skb_tail_pointer(skb) - |
1135 | skb_transport_header(skb); | 1135 | skb_transport_header(skb); |
1136 | spin_unlock_bh(&sk->sk_receive_queue.lock); | 1136 | spin_unlock_bh(&sk->sk_receive_queue.lock); |