diff options
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 6 |
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 | } |