--- zzzz-none-000/linux-2.6.39.4/net/ipv6/raw.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/net/ipv6/raw.c 2021-11-10 13:23:11.000000000 +0000 @@ -169,7 +169,7 @@ read_lock(&raw_v6_hashinfo.lock); sk = sk_head(&raw_v6_hashinfo.ht[hash]); - if (sk == NULL) + if (!sk) goto out; net = dev_net(skb->dev); @@ -232,7 +232,7 @@ if (raw_sk && !ipv6_raw_deliver(skb, nexthdr)) raw_sk = NULL; - return raw_sk != NULL; + return !!raw_sk; } /* This cleans up af_inet6 a bit. -DaveM */ @@ -355,7 +355,7 @@ read_lock(&raw_v6_hashinfo.lock); sk = sk_head(&raw_v6_hashinfo.ht[hash]); - if (sk != NULL) { + if (sk) { /* Note: ipv6_hdr(skb) != skb->data */ struct ipv6hdr *ip6h = (struct ipv6hdr *)skb->data; saddr = &ip6h->saddr; @@ -621,7 +621,7 @@ skb = sock_alloc_send_skb(sk, length + LL_ALLOCATED_SPACE(rt->dst.dev) + 15, flags & MSG_DONTWAIT, &err); - if (skb == NULL) + if (!skb) goto error; skb_reserve(skb, LL_RESERVED_SPACE(rt->dst.dev)); @@ -782,7 +782,7 @@ fl6.flowlabel = sin6->sin6_flowinfo&IPV6_FLOWINFO_MASK; if (fl6.flowlabel&IPV6_FLOWLABEL_MASK) { flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); - if (flowlabel == NULL) + if (!flowlabel) return -EINVAL; daddr = &flowlabel->dst; } @@ -825,13 +825,13 @@ } if ((fl6.flowlabel&IPV6_FLOWLABEL_MASK) && !flowlabel) { flowlabel = fl6_sock_lookup(sk, fl6.flowlabel); - if (flowlabel == NULL) + if (!flowlabel) return -EINVAL; } if (!(opt->opt_nflen|opt->opt_flen)) opt = NULL; } - if (opt == NULL) + if (!opt) opt = np->opt; if (flowlabel) opt = fl6_merge_options(&opt_space, flowlabel, opt); @@ -1133,7 +1133,7 @@ spin_lock_bh(&sk->sk_receive_queue.lock); skb = skb_peek(&sk->sk_receive_queue); - if (skb != NULL) + if (skb) amount = skb->tail - skb->transport_header; spin_unlock_bh(&sk->sk_receive_queue.lock); return put_user(amount, (int __user *)arg);