aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
authorIan Morris <ipm@chirality.org.uk>2015-03-29 09:00:04 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-31 13:51:54 -0400
commit63159f29be1df7f93563a8a0f78c5e65fc844ed6 (patch)
treeaba1b4275abb0692728b97851f2d52e07d3f6e94 /net/ipv6/raw.c
parentbc48878c06028f297e4fdf75be7dda88de050430 (diff)
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/raw.c')
-rw-r--r--net/ipv6/raw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index a5287b3582a4..e33576df4658 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -172,7 +172,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
172 read_lock(&raw_v6_hashinfo.lock); 172 read_lock(&raw_v6_hashinfo.lock);
173 sk = sk_head(&raw_v6_hashinfo.ht[hash]); 173 sk = sk_head(&raw_v6_hashinfo.ht[hash]);
174 174
175 if (sk == NULL) 175 if (!sk)
176 goto out; 176 goto out;
177 177
178 net = dev_net(skb->dev); 178 net = dev_net(skb->dev);
@@ -630,7 +630,7 @@ static int rawv6_send_hdrinc(struct sock *sk, struct msghdr *msg, int length,
630 skb = sock_alloc_send_skb(sk, 630 skb = sock_alloc_send_skb(sk,
631 length + hlen + tlen + 15, 631 length + hlen + tlen + 15,
632 flags & MSG_DONTWAIT, &err); 632 flags & MSG_DONTWAIT, &err);
633 if (skb == NULL) 633 if (!skb)
634 goto error; 634 goto error;
635 skb_reserve(skb, hlen); 635 skb_reserve(skb, hlen);
636 636
@@ -789,7 +789,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
789 fl6.flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK; 789 fl6.flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK;
790 if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { 790 if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) {
791 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); 791 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
792 if (flowlabel == NULL) 792 if (!flowlabel)
793 return -EINVAL; 793 return -EINVAL;
794 } 794 }
795 } 795 }
@@ -831,13 +831,13 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
831 } 831 }
832 if ((fl6.flowlabel&IPV6_FLOWLABEL_MASK) && !flowlabel) { 832 if ((fl6.flowlabel&IPV6_FLOWLABEL_MASK) && !flowlabel) {
833 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); 833 flowlabel = fl6_sock_lookup(sk, fl6.flowlabel);
834 if (flowlabel == NULL) 834 if (!flowlabel)
835 return -EINVAL; 835 return -EINVAL;
836 } 836 }
837 if (!(opt->opt_nflen|opt->opt_flen)) 837 if (!(opt->opt_nflen|opt->opt_flen))
838 opt = NULL; 838 opt = NULL;
839 } 839 }
840 if (opt == NULL) 840 if (!opt)
841 opt = np->opt; 841 opt = np->opt;
842 if (flowlabel) 842 if (flowlabel)
843 opt = fl6_merge_options(&opt_space, flowlabel, opt); 843 opt = fl6_merge_options(&opt_space, flowlabel, opt);