Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20b2fab4 authored by Jozsef Kadlecsik's avatar Jozsef Kadlecsik
Browse files

netfilter: ipset: Fix "may be used uninitialized" warnings

parent 35b8dcf8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[],
{
	struct bitmap_ip *map = set->data;
	ipset_adtfn adtfn = set->variant->adt[adt];
	u32 ip, ip_to;
	u32 ip = 0, ip_to = 0;
	struct bitmap_ip_adt_elem e = { };
	struct ip_set_ext ext = IP_SET_INIT_UEXT(map);
	int ret = 0;
@@ -264,7 +264,7 @@ static int
bitmap_ip_create(struct ip_set *set, struct nlattr *tb[], u32 flags)
{
	struct bitmap_ip *map;
	u32 first_ip, last_ip, hosts, cadt_flags = 0;
	u32 first_ip = 0, last_ip = 0, hosts, cadt_flags = 0;
	u64 elements;
	u8 netmask = 32;
	int ret;
+2 −2
Original line number Diff line number Diff line
@@ -246,7 +246,7 @@ bitmap_ipmac_uadt(struct ip_set *set, struct nlattr *tb[],
	ipset_adtfn adtfn = set->variant->adt[adt];
	struct bitmap_ipmac_adt_elem e = {};
	struct ip_set_ext ext = IP_SET_INIT_UEXT(map);
	u32 ip;
	u32 ip = 0;
	int ret = 0;

	if (unlikely(!tb[IPSET_ATTR_IP] ||
@@ -355,7 +355,7 @@ static int
bitmap_ipmac_create(struct ip_set *set, struct nlattr *tb[],
		    u32 flags)
{
	u32 first_ip, last_ip, cadt_flags = 0;
	u32 first_ip = 0, last_ip = 0, cadt_flags = 0;
	u64 elements;
	struct bitmap_ipmac *map;
	int ret;
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[],
	ipset_adtfn adtfn = set->variant->adt[adt];
	struct hash_ip4_elem e = {};
	struct ip_set_ext ext = IP_SET_INIT_UEXT(h);
	u32 ip, ip_to, hosts;
	u32 ip = 0, ip_to = 0, hosts;
	int ret = 0;

	if (unlikely(!tb[IPSET_ATTR_IP] ||
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[],
	ipset_adtfn adtfn = set->variant->adt[adt];
	struct hash_ipport4_elem e = { };
	struct ip_set_ext ext = IP_SET_INIT_UEXT(h);
	u32 ip, ip_to, p = 0, port, port_to;
	u32 ip, ip_to = 0, p = 0, port, port_to;
	bool with_ports = false;
	int ret;

+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
	ipset_adtfn adtfn = set->variant->adt[adt];
	struct hash_ipportip4_elem e = { };
	struct ip_set_ext ext = IP_SET_INIT_UEXT(h);
	u32 ip, ip_to, p = 0, port, port_to;
	u32 ip, ip_to = 0, p = 0, port, port_to;
	bool with_ports = false;
	int ret;

Loading