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
4093{4093{
4094 struct sk_buff *skb_chk;4094 struct sk_buff *skb_chk;
4095 unsigned int offset = skb_transport_offset(skb);4095 unsigned int offset = skb_transport_offset(skb);
4096 int ret;4096 __sum16 ret;
4097 4097
4098 skb_chk = skb_checksum_maybe_trim(skb, transport_len);4098 skb_chk = skb_checksum_maybe_trim(skb, transport_len);
4099 if (!skb_chk)4099 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
47static int ipv6_mc_check_exthdrs(struct sk_buff *skb)47static int ipv6_mc_check_exthdrs(struct sk_buff *skb)
48{48{
49 const struct ipv6hdr *ip6h;49 const struct ipv6hdr *ip6h;
50 unsigned int offset;50 int offset;
51 u8 nexthdr;51 u8 nexthdr;
52 __be16 frag_off;52 __be16 frag_off;
53 53