diff options
-rw-r--r-- | include/net/inet_hashtables.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 22 | ||||
-rw-r--r-- | net/appletalk/aarp.c | 2 | ||||
-rw-r--r-- | net/atm/signaling.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 4 | ||||
-rw-r--r-- | net/core/pktgen.c | 30 | ||||
-rw-r--r-- | net/core/scm.c | 9 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 5 | ||||
-rw-r--r-- | net/ipv4/inet_lro.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_sockglue.c | 6 | ||||
-rw-r--r-- | net/ipv4/proc.c | 2 | ||||
-rw-r--r-- | net/ipv4/route.c | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/anycast.c | 2 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 4 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 2 | ||||
-rw-r--r-- | net/sched/cls_u32.c | 2 | ||||
-rw-r--r-- | net/socket.c | 2 |
19 files changed, 52 insertions, 54 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index d27ee8c0da3f..8228b57eb18f 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -107,7 +107,7 @@ struct inet_hashinfo { | |||
107 | */ | 107 | */ |
108 | struct inet_bind_hashbucket *bhash; | 108 | struct inet_bind_hashbucket *bhash; |
109 | 109 | ||
110 | int bhash_size; | 110 | unsigned int bhash_size; |
111 | unsigned int ehash_size; | 111 | unsigned int ehash_size; |
112 | 112 | ||
113 | /* All sockets in TCP_LISTEN state will be in here. This is the only | 113 | /* All sockets in TCP_LISTEN state will be in here. This is the only |
diff --git a/include/net/sock.h b/include/net/sock.h index 74e1f7d90d73..453c79d0915b 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -485,17 +485,17 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
485 | skb->next = NULL; | 485 | skb->next = NULL; |
486 | } | 486 | } |
487 | 487 | ||
488 | #define sk_wait_event(__sk, __timeo, __condition) \ | 488 | #define sk_wait_event(__sk, __timeo, __condition) \ |
489 | ({ int rc; \ | 489 | ({ int __rc; \ |
490 | release_sock(__sk); \ | 490 | release_sock(__sk); \ |
491 | rc = __condition; \ | 491 | __rc = __condition; \ |
492 | if (!rc) { \ | 492 | if (!__rc) { \ |
493 | *(__timeo) = schedule_timeout(*(__timeo)); \ | 493 | *(__timeo) = schedule_timeout(*(__timeo)); \ |
494 | } \ | 494 | } \ |
495 | lock_sock(__sk); \ | 495 | lock_sock(__sk); \ |
496 | rc = __condition; \ | 496 | __rc = __condition; \ |
497 | rc; \ | 497 | __rc; \ |
498 | }) | 498 | }) |
499 | 499 | ||
500 | extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p); | 500 | extern int sk_stream_wait_connect(struct sock *sk, long *timeo_p); |
501 | extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p); | 501 | extern int sk_stream_wait_memory(struct sock *sk, long *timeo_p); |
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 92cd74973c97..6c5c6dc098ec 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -822,8 +822,6 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, | |||
822 | * address. So as a precaution flush any | 822 | * address. So as a precaution flush any |
823 | * entries we have for this address. | 823 | * entries we have for this address. |
824 | */ | 824 | */ |
825 | struct aarp_entry *a; | ||
826 | |||
827 | a = __aarp_find_entry(resolved[sa.s_node % | 825 | a = __aarp_find_entry(resolved[sa.s_node % |
828 | (AARP_HASH_SIZE - 1)], | 826 | (AARP_HASH_SIZE - 1)], |
829 | skb->dev, &sa); | 827 | skb->dev, &sa); |
diff --git a/net/atm/signaling.c b/net/atm/signaling.c index bced78b77f12..229921400522 100644 --- a/net/atm/signaling.c +++ b/net/atm/signaling.c | |||
@@ -230,7 +230,7 @@ static void sigd_close(struct atm_vcc *vcc) | |||
230 | struct hlist_head *head = &vcc_hash[i]; | 230 | struct hlist_head *head = &vcc_hash[i]; |
231 | 231 | ||
232 | sk_for_each(s, node, head) { | 232 | sk_for_each(s, node, head) { |
233 | struct atm_vcc *vcc = atm_sk(s); | 233 | vcc = atm_sk(s); |
234 | 234 | ||
235 | purge_vcc(vcc); | 235 | purge_vcc(vcc); |
236 | } | 236 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index d99864662582..13a1bc5d3bfd 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -780,7 +780,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf) | |||
780 | int i = 0; | 780 | int i = 0; |
781 | const char *p; | 781 | const char *p; |
782 | const int max_netdevices = 8*PAGE_SIZE; | 782 | const int max_netdevices = 8*PAGE_SIZE; |
783 | long *inuse; | 783 | unsigned long *inuse; |
784 | struct net_device *d; | 784 | struct net_device *d; |
785 | 785 | ||
786 | p = strnchr(name, IFNAMSIZ-1, '%'); | 786 | p = strnchr(name, IFNAMSIZ-1, '%'); |
@@ -794,7 +794,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf) | |||
794 | return -EINVAL; | 794 | return -EINVAL; |
795 | 795 | ||
796 | /* Use one page as a bit array of possible slots */ | 796 | /* Use one page as a bit array of possible slots */ |
797 | inuse = (long *) get_zeroed_page(GFP_ATOMIC); | 797 | inuse = (unsigned long *) get_zeroed_page(GFP_ATOMIC); |
798 | if (!inuse) | 798 | if (!inuse) |
799 | return -ENOMEM; | 799 | return -ENOMEM; |
800 | 800 | ||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f07bd590f8f9..2100c734b102 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -1563,15 +1563,17 @@ static ssize_t pktgen_if_write(struct file *file, | |||
1563 | } | 1563 | } |
1564 | 1564 | ||
1565 | if (!strcmp(name, "mpls")) { | 1565 | if (!strcmp(name, "mpls")) { |
1566 | unsigned n, offset; | 1566 | unsigned n, cnt; |
1567 | |||
1567 | len = get_labels(&user_buffer[i], pkt_dev); | 1568 | len = get_labels(&user_buffer[i], pkt_dev); |
1568 | if (len < 0) { return len; } | 1569 | if (len < 0) |
1570 | return len; | ||
1569 | i += len; | 1571 | i += len; |
1570 | offset = sprintf(pg_result, "OK: mpls="); | 1572 | cnt = sprintf(pg_result, "OK: mpls="); |
1571 | for (n = 0; n < pkt_dev->nr_labels; n++) | 1573 | for (n = 0; n < pkt_dev->nr_labels; n++) |
1572 | offset += sprintf(pg_result + offset, | 1574 | cnt += sprintf(pg_result + cnt, |
1573 | "%08x%s", ntohl(pkt_dev->labels[n]), | 1575 | "%08x%s", ntohl(pkt_dev->labels[n]), |
1574 | n == pkt_dev->nr_labels-1 ? "" : ","); | 1576 | n == pkt_dev->nr_labels-1 ? "" : ","); |
1575 | 1577 | ||
1576 | if (pkt_dev->nr_labels && pkt_dev->vlan_id != 0xffff) { | 1578 | if (pkt_dev->nr_labels && pkt_dev->vlan_id != 0xffff) { |
1577 | pkt_dev->vlan_id = 0xffff; /* turn off VLAN/SVLAN */ | 1579 | pkt_dev->vlan_id = 0xffff; /* turn off VLAN/SVLAN */ |
@@ -2731,6 +2733,7 @@ static unsigned int scan_ip6(const char *s, char ip[16]) | |||
2731 | unsigned int prefixlen = 0; | 2733 | unsigned int prefixlen = 0; |
2732 | unsigned int suffixlen = 0; | 2734 | unsigned int suffixlen = 0; |
2733 | __be32 tmp; | 2735 | __be32 tmp; |
2736 | char *pos; | ||
2734 | 2737 | ||
2735 | for (i = 0; i < 16; i++) | 2738 | for (i = 0; i < 16; i++) |
2736 | ip[i] = 0; | 2739 | ip[i] = 0; |
@@ -2745,12 +2748,9 @@ static unsigned int scan_ip6(const char *s, char ip[16]) | |||
2745 | } | 2748 | } |
2746 | s++; | 2749 | s++; |
2747 | } | 2750 | } |
2748 | { | ||
2749 | char *tmp; | ||
2750 | u = simple_strtoul(s, &tmp, 16); | ||
2751 | i = tmp - s; | ||
2752 | } | ||
2753 | 2751 | ||
2752 | u = simple_strtoul(s, &pos, 16); | ||
2753 | i = pos - s; | ||
2754 | if (!i) | 2754 | if (!i) |
2755 | return 0; | 2755 | return 0; |
2756 | if (prefixlen == 12 && s[i] == '.') { | 2756 | if (prefixlen == 12 && s[i] == '.') { |
@@ -2778,11 +2778,9 @@ static unsigned int scan_ip6(const char *s, char ip[16]) | |||
2778 | len++; | 2778 | len++; |
2779 | } else if (suffixlen != 0) | 2779 | } else if (suffixlen != 0) |
2780 | break; | 2780 | break; |
2781 | { | 2781 | |
2782 | char *tmp; | 2782 | u = simple_strtol(s, &pos, 16); |
2783 | u = simple_strtol(s, &tmp, 16); | 2783 | i = pos - s; |
2784 | i = tmp - s; | ||
2785 | } | ||
2786 | if (!i) { | 2784 | if (!i) { |
2787 | if (*s) | 2785 | if (*s) |
2788 | len--; | 2786 | len--; |
diff --git a/net/core/scm.c b/net/core/scm.c index 44c4ec2c8769..530bee8d9ed9 100644 --- a/net/core/scm.c +++ b/net/core/scm.c | |||
@@ -167,7 +167,8 @@ error: | |||
167 | 167 | ||
168 | int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data) | 168 | int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data) |
169 | { | 169 | { |
170 | struct cmsghdr __user *cm = (struct cmsghdr __user *)msg->msg_control; | 170 | struct cmsghdr __user *cm |
171 | = (__force struct cmsghdr __user *)msg->msg_control; | ||
171 | struct cmsghdr cmhdr; | 172 | struct cmsghdr cmhdr; |
172 | int cmlen = CMSG_LEN(len); | 173 | int cmlen = CMSG_LEN(len); |
173 | int err; | 174 | int err; |
@@ -202,7 +203,8 @@ out: | |||
202 | 203 | ||
203 | void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) | 204 | void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) |
204 | { | 205 | { |
205 | struct cmsghdr __user *cm = (struct cmsghdr __user*)msg->msg_control; | 206 | struct cmsghdr __user *cm |
207 | = (__force struct cmsghdr __user*)msg->msg_control; | ||
206 | 208 | ||
207 | int fdmax = 0; | 209 | int fdmax = 0; |
208 | int fdnum = scm->fp->count; | 210 | int fdnum = scm->fp->count; |
@@ -222,7 +224,8 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) | |||
222 | if (fdnum < fdmax) | 224 | if (fdnum < fdmax) |
223 | fdmax = fdnum; | 225 | fdmax = fdnum; |
224 | 226 | ||
225 | for (i=0, cmfptr=(int __user *)CMSG_DATA(cm); i<fdmax; i++, cmfptr++) | 227 | for (i=0, cmfptr=(__force int __user *)CMSG_DATA(cm); i<fdmax; |
228 | i++, cmfptr++) | ||
226 | { | 229 | { |
227 | int new_fd; | 230 | int new_fd; |
228 | err = security_file_receive(fp[i]); | 231 | err = security_file_receive(fp[i]); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index ad500a43b359..2b6e59c4c0d0 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1695,8 +1695,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, | |||
1695 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[i]); | 1695 | (void) ip_mc_del1_src(pmc, sfmode, &psfsrc[i]); |
1696 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { | 1696 | } else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE] != 0)) { |
1697 | #ifdef CONFIG_IP_MULTICAST | 1697 | #ifdef CONFIG_IP_MULTICAST |
1698 | struct in_device *in_dev = pmc->interface; | ||
1699 | struct ip_sf_list *psf; | 1698 | struct ip_sf_list *psf; |
1699 | in_dev = pmc->interface; | ||
1700 | #endif | 1700 | #endif |
1701 | 1701 | ||
1702 | /* filter mode change */ | 1702 | /* filter mode change */ |
@@ -1799,7 +1799,7 @@ static int ip_mc_leave_src(struct sock *sk, struct ip_mc_socklist *iml, | |||
1799 | { | 1799 | { |
1800 | int err; | 1800 | int err; |
1801 | 1801 | ||
1802 | if (iml->sflist == 0) { | 1802 | if (iml->sflist == NULL) { |
1803 | /* any-source empty exclude case */ | 1803 | /* any-source empty exclude case */ |
1804 | return ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, | 1804 | return ip_mc_del_src(in_dev, &iml->multi.imr_multiaddr.s_addr, |
1805 | iml->sfmode, 0, NULL, 0); | 1805 | iml->sfmode, 0, NULL, 0); |
@@ -2167,7 +2167,6 @@ int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, | |||
2167 | return -EFAULT; | 2167 | return -EFAULT; |
2168 | } | 2168 | } |
2169 | for (i=0; i<copycount; i++) { | 2169 | for (i=0; i<copycount; i++) { |
2170 | struct sockaddr_in *psin; | ||
2171 | struct sockaddr_storage ss; | 2170 | struct sockaddr_storage ss; |
2172 | 2171 | ||
2173 | psin = (struct sockaddr_in *)&ss; | 2172 | psin = (struct sockaddr_in *)&ss; |
diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index 20bc593bb963..4545b64e2815 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c | |||
@@ -482,7 +482,7 @@ static struct sk_buff *__lro_proc_segment(struct net_lro_mgr *lro_mgr, | |||
482 | 482 | ||
483 | lro_init_desc(lro_desc, skb, iph, tcph, 0, NULL); | 483 | lro_init_desc(lro_desc, skb, iph, tcph, 0, NULL); |
484 | LRO_INC_STATS(lro_mgr, aggregated); | 484 | LRO_INC_STATS(lro_mgr, aggregated); |
485 | return 0; | 485 | return NULL; |
486 | } | 486 | } |
487 | 487 | ||
488 | if (lro_desc->tcp_next_seq != ntohl(tcph->seq)) | 488 | if (lro_desc->tcp_next_seq != ntohl(tcph->seq)) |
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 | } |
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 9dee70e1cf0d..e5b05b039101 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -144,7 +144,7 @@ static struct { | |||
144 | { "TimestampReps", ICMP_TIMESTAMPREPLY }, | 144 | { "TimestampReps", ICMP_TIMESTAMPREPLY }, |
145 | { "AddrMasks", ICMP_ADDRESS }, | 145 | { "AddrMasks", ICMP_ADDRESS }, |
146 | { "AddrMaskReps", ICMP_ADDRESSREPLY }, | 146 | { "AddrMaskReps", ICMP_ADDRESSREPLY }, |
147 | { 0, 0 } | 147 | { NULL, 0 } |
148 | }; | 148 | }; |
149 | 149 | ||
150 | 150 | ||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 2a9b363e820c..307e1f1107ca 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -246,7 +246,7 @@ static spinlock_t *rt_hash_locks; | |||
246 | 246 | ||
247 | static struct rt_hash_bucket *rt_hash_table; | 247 | static struct rt_hash_bucket *rt_hash_table; |
248 | static unsigned rt_hash_mask; | 248 | static unsigned rt_hash_mask; |
249 | static int rt_hash_log; | 249 | static unsigned int rt_hash_log; |
250 | static unsigned int rt_hash_rnd; | 250 | static unsigned int rt_hash_rnd; |
251 | 251 | ||
252 | static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); | 252 | static DEFINE_PER_CPU(struct rt_cache_stat, rt_cache_stat); |
@@ -593,7 +593,7 @@ static void rt_check_expire(struct work_struct *work) | |||
593 | i = (i + 1) & rt_hash_mask; | 593 | i = (i + 1) & rt_hash_mask; |
594 | rthp = &rt_hash_table[i].chain; | 594 | rthp = &rt_hash_table[i].chain; |
595 | 595 | ||
596 | if (*rthp == 0) | 596 | if (*rthp == NULL) |
597 | continue; | 597 | continue; |
598 | spin_lock_bh(rt_hash_lock_addr(i)); | 598 | spin_lock_bh(rt_hash_lock_addr(i)); |
599 | while ((rth = *rthp) != NULL) { | 599 | while ((rth = *rthp) != NULL) { |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 4268cd13ff9a..e8c39488cf58 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2704,7 +2704,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, s32 *seq_rtt_p) | |||
2704 | BUG_TRAP((int)tp->lost_out >= 0); | 2704 | BUG_TRAP((int)tp->lost_out >= 0); |
2705 | BUG_TRAP((int)tp->retrans_out >= 0); | 2705 | BUG_TRAP((int)tp->retrans_out >= 0); |
2706 | if (!tp->packets_out && tcp_is_sack(tp)) { | 2706 | if (!tp->packets_out && tcp_is_sack(tp)) { |
2707 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2707 | icsk = inet_csk(sk); |
2708 | if (tp->lost_out) { | 2708 | if (tp->lost_out) { |
2709 | printk(KERN_DEBUG "Leak l=%u %d\n", | 2709 | printk(KERN_DEBUG "Leak l=%u %d\n", |
2710 | tp->lost_out, icsk->icsk_ca_state); | 2710 | tp->lost_out, icsk->icsk_ca_state); |
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 |
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index d4d5d2f271d2..9e98c6e567dd 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -592,7 +592,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
592 | } else | 592 | } else |
593 | handle = gen_new_kid(ht, htid); | 593 | handle = gen_new_kid(ht, htid); |
594 | 594 | ||
595 | if (tb[TCA_U32_SEL-1] == 0 || | 595 | if (tb[TCA_U32_SEL-1] == NULL || |
596 | RTA_PAYLOAD(tb[TCA_U32_SEL-1]) < sizeof(struct tc_u32_sel)) | 596 | RTA_PAYLOAD(tb[TCA_U32_SEL-1]) < sizeof(struct tc_u32_sel)) |
597 | return -EINVAL; | 597 | return -EINVAL; |
598 | 598 | ||
diff --git a/net/socket.c b/net/socket.c index bc16eee4dc80..d2336472f494 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1929,7 +1929,7 @@ asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, | |||
1929 | * kernel msghdr to use the kernel address space) | 1929 | * kernel msghdr to use the kernel address space) |
1930 | */ | 1930 | */ |
1931 | 1931 | ||
1932 | uaddr = (void __user *)msg_sys.msg_name; | 1932 | uaddr = (__force void __user *)msg_sys.msg_name; |
1933 | uaddr_len = COMPAT_NAMELEN(msg); | 1933 | uaddr_len = COMPAT_NAMELEN(msg); |
1934 | if (MSG_CMSG_COMPAT & flags) { | 1934 | if (MSG_CMSG_COMPAT & flags) { |
1935 | err = verify_compat_iovec(&msg_sys, iov, addr, VERIFY_WRITE); | 1935 | err = verify_compat_iovec(&msg_sys, iov, addr, VERIFY_WRITE); |