aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_sockglue.c
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/ipv4/ip_sockglue.c
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/ipv4/ip_sockglue.c')
-rw-r--r--net/ipv4/ip_sockglue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index b2b3053dfef7..f51f20e487c8 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -659,7 +659,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
659 break; 659 break;
660 } 660 }
661 msf = kmalloc(optlen, GFP_KERNEL); 661 msf = kmalloc(optlen, GFP_KERNEL);
662 if (msf == 0) { 662 if (!msf) {
663 err = -ENOBUFS; 663 err = -ENOBUFS;
664 break; 664 break;
665 } 665 }
@@ -816,7 +816,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
816 break; 816 break;
817 } 817 }
818 gsf = kmalloc(optlen,GFP_KERNEL); 818 gsf = kmalloc(optlen,GFP_KERNEL);
819 if (gsf == 0) { 819 if (!gsf) {
820 err = -ENOBUFS; 820 err = -ENOBUFS;
821 break; 821 break;
822 } 822 }
@@ -836,7 +836,7 @@ static int do_ip_setsockopt(struct sock *sk, int level,
836 } 836 }
837 msize = IP_MSFILTER_SIZE(gsf->gf_numsrc); 837 msize = IP_MSFILTER_SIZE(gsf->gf_numsrc);
838 msf = kmalloc(msize,GFP_KERNEL); 838 msf = kmalloc(msize,GFP_KERNEL);
839 if (msf == 0) { 839 if (!msf) {
840 err = -ENOBUFS; 840 err = -ENOBUFS;
841 goto mc_msf_out; 841 goto mc_msf_out;
842 } 842 }