]> granicus.if.org Git - ipset/commitdiff
Suppress false compile-time warnings:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 15 Sep 2011 07:07:41 +0000 (09:07 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Thu, 15 Sep 2011 07:07:41 +0000 (09:07 +0200)
warning: 'ip_to' may be used uninitialized in this function

kernel/net/netfilter/ipset/ip_set_hash_ipport.c
kernel/net/netfilter/ipset/ip_set_hash_ipportip.c
kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c

index 30a62736717f65ad432316189c5b85ed1a35b4cb..9c27e249c1713bb14d9d03c730bd2a5a125c6177 100644 (file)
@@ -158,7 +158,7 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
        const struct ip_set_hash *h = set->data;
        ipset_adtfn adtfn = set->variant->adt[adt];
        struct hash_ipport4_elem data = { };
-       u32 ip, ip_to, p = 0, port, port_to;
+       u32 ip, ip_to = 0, p = 0, port, port_to;
        u32 timeout = h->timeout;
        bool with_ports = false;
        int ret;
index 55de64223fac44da25186b2ff93223eb2dd0167e..9134057c07284cf41b1e2d119415e8c043a0fc9a 100644 (file)
@@ -162,7 +162,7 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
        const struct ip_set_hash *h = set->data;
        ipset_adtfn adtfn = set->variant->adt[adt];
        struct hash_ipportip4_elem data = { };
-       u32 ip, ip_to, p = 0, port, port_to;
+       u32 ip, ip_to = 0, p = 0, port, port_to;
        u32 timeout = h->timeout;
        bool with_ports = false;
        int ret;
index 6ee4f72052b73dfdb9cd6c8cef45a7eb714987cd..0edb35b81e36fb2da167f4921aa56c1bf299442e 100644 (file)
@@ -184,7 +184,7 @@ hash_ipportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
        const struct ip_set_hash *h = set->data;
        ipset_adtfn adtfn = set->variant->adt[adt];
        struct hash_ipportnet4_elem data = { .cidr = HOST_MASK };
-       u32 ip, ip_to, p = 0, port, port_to;
+       u32 ip, ip_to = 0, p = 0, port, port_to;
        u32 ip2_from = 0, ip2_to, ip2_last, ip2;
        u32 timeout = h->timeout;
        bool with_ports = false;