]> granicus.if.org Git - ipset/commitdiff
Fix sparse warnings
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 23 Mar 2017 21:10:40 +0000 (22:10 +0100)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 23 Mar 2017 21:10:40 +0000 (22:10 +0100)
kernel/net/netfilter/ipset/ip_set_core.c
kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c

index f497e992ad418c572f0399a61d10d1ab7c09c6a5..3bb832da4e5dce0b5ff28f793b93ce661719eb32 100644 (file)
@@ -36,7 +36,7 @@ struct ip_set_net {
        bool            is_destroyed;   /* all sets are destroyed */
 };
 
-static int ip_set_net_id __read_mostly;
+static unsigned int ip_set_net_id __read_mostly;
 
 static inline struct ip_set_net *ip_set_pernet(struct net *net)
 {
index 5ab1b99a53c2b4338837a1fc17e067b9fee6a9d7..24bf55860108df08bf804a2d44f015e33c675d87 100644 (file)
@@ -434,7 +434,7 @@ hash_ipportnet6_uadt(struct ip_set *set, struct nlattr *tb[],
        if (unlikely(tb[IPSET_ATTR_IP_TO]))
                return -IPSET_ERR_HASH_RANGE_UNSUPPORTED;
        if (unlikely(tb[IPSET_ATTR_CIDR])) {
-               u8 cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]);
+               cidr = nla_get_u8(tb[IPSET_ATTR_CIDR]);
 
                if (cidr != HOST_MASK)
                        return -IPSET_ERR_INVALID_CIDR;