aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-09 04:59:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:48 -0400
commitcfcabdcc2d5a810208e5bb3974121b7ed60119aa (patch)
tree1aed711eeecc5a303b57f1fc47e1b5746e8a72c2 /net/ipv6
parentde83c058af25aa97ed4864abab11e90e8dead6e2 (diff)
[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>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/anycast.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/ipv6/mcast.c4
-rw-r--r--net/ipv6/ndisc.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index d407992c1481..5810852c558a 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -414,7 +414,7 @@ static int ipv6_chk_acast_dev(struct net_device *dev, struct in6_addr *addr)
414 break; 414 break;
415 read_unlock_bh(&idev->lock); 415 read_unlock_bh(&idev->lock);
416 in6_dev_put(idev); 416 in6_dev_put(idev);
417 return aca != 0; 417 return aca != NULL;
418 } 418 }
419 return 0; 419 return 0;
420} 420}
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index eb330a44bacd..532425db11fe 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -663,7 +663,7 @@ done:
663 break; 663 break;
664 } 664 }
665 gsf = kmalloc(optlen,GFP_KERNEL); 665 gsf = kmalloc(optlen,GFP_KERNEL);
666 if (gsf == 0) { 666 if (!gsf) {
667 retv = -ENOBUFS; 667 retv = -ENOBUFS;
668 break; 668 break;
669 } 669 }
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 8668ab3af32e..cc8d4e2a9531 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1407,7 +1407,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size)
1407 /* we assume size > sizeof(ra) here */ 1407 /* we assume size > sizeof(ra) here */
1408 skb = sock_alloc_send_skb(sk, size + LL_RESERVED_SPACE(dev), 1, &err); 1408 skb = sock_alloc_send_skb(sk, size + LL_RESERVED_SPACE(dev), 1, &err);
1409 1409
1410 if (skb == 0) 1410 if (!skb)
1411 return NULL; 1411 return NULL;
1412 1412
1413 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 1413 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,
2144 /* callers have the socket lock and a write lock on ipv6_sk_mc_lock, 2144 /* callers have the socket lock and a write lock on ipv6_sk_mc_lock,
2145 * so no other readers or writers of iml or its sflist 2145 * so no other readers or writers of iml or its sflist
2146 */ 2146 */
2147 if (iml->sflist == 0) { 2147 if (!iml->sflist) {
2148 /* any-source empty exclude case */ 2148 /* any-source empty exclude case */
2149 return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0); 2149 return ip6_mc_del_src(idev, &iml->addr, iml->sfmode, 0, NULL, 0);
2150 } 2150 }
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index b761dbed8cec..d4acd283111b 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -256,7 +256,7 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
256 break; 256 break;
257 case ND_OPT_PREFIX_INFO: 257 case ND_OPT_PREFIX_INFO:
258 ndopts->nd_opts_pi_end = nd_opt; 258 ndopts->nd_opts_pi_end = nd_opt;
259 if (ndopts->nd_opt_array[nd_opt->nd_opt_type] == 0) 259 if (!ndopts->nd_opt_array[nd_opt->nd_opt_type])
260 ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt; 260 ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
261 break; 261 break;
262#ifdef CONFIG_IPV6_ROUTE_INFO 262#ifdef CONFIG_IPV6_ROUTE_INFO