[NET]: sparse warning fixes
Fix a bunch of sparse warnings. Mostly about 0 used as NULL pointer, and shadowed variable declarations. One notable case was that hash size should have been unsigned. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
de83c058af
commit
cfcabdcc2d
@@ -1407,7 +1407,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
|
||||
/* we assume size > sizeof(ra) here */
|
||||
skb = sock_alloc_send_skb(sk, size + LL_RESERVED_SPACE(dev), 1, &err);
|
||||
|
||||
if (skb == 0)
|
||||
if (!skb)
|
||||
return NULL;
|
||||
|
||||
skb_reserve(skb, LL_RESERVED_SPACE(dev));
|
||||
@@ -2144,7 +2144,7 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml,
|
||||
/* callers have the socket lock and a write lock on ipv6_sk_mc_lock,
|
||||
* so no other readers or writers of iml or its sflist
|
||||
*/
|
||||
if (iml->sflist == 0) {
|
||||
if (!iml->sflist) {
|
||||
/* any-source empty exclude case */
|
||||
return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user