netfilter: ipset: Fix sparse warnings
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 11 Sep 2017 19:52:38 +0000 (21:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 4 Oct 2017 14:19:06 +0000 (16:19 +0200)
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_hash_ipportnet.c

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;