History

net: fix two sparse warnings introduced by IGMP/MLD parsing exports

> net/core/skbuff.c:4108:13: sparse: incorrect type in assignment (different base types) > net/ipv6/mcast_snoop.c:63 ipv6_mc_check_exthdrs() warn: unsigned 'offset' is never less than zero. Introduced by 9afd85c9e4552b276e2f4cfefd622bdeeffbbf26 ("net: Export IGMP/MLD message validation code")

Linus Lüssing committed 11 years ago

Commit fcba67c1 parent f9161582 files · +2 −2Browse files

Unified · Split

2 files
  1. net/core/skbuff.c +1 −1
  2. net/ipv6/mcast_snoop.c +1 −1
net/core/skbuff.c+1−1
@@ -4093,7 +4093,7 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb, · 4092 unmodified lines
40934093 {
40944094 struct sk_buff *skb_chk;
40954095 unsigned int offset = skb_transport_offset(skb);
4096− int ret;
4096+ __sum16 ret;
40974097
40984098 skb_chk = skb_checksum_maybe_trim(skb, transport_len);
40994099 if (!skb_chk)
net/ipv6/mcast_snoop.c+1−1
@@ -47,7 +47,7 @@ static int ipv6_mc_check_ip6hdr(struct sk_buff *skb) · 46 unmodified lines
4747 static int ipv6_mc_check_exthdrs(struct sk_buff *skb)
4848 {
4949 const struct ipv6hdr *ip6h;
50− unsigned int offset;
50+ int offset;
5151 u8 nexthdr;
5252 __be16 frag_off;
5353