Skip to contentSkip to conversation

netfilter:ipset: fix the compile warning in ip_set_create

PATCH In review Shan Wei 3 participants 4 messages Mar 4, 2011 – Mar 8, 2011

Subsystems (2)
lore
Share & tools
lore

Shan Wei

author
#0 lore raw

PATCH 1/1 netfilter:ipset: fix the compile warning in ip_set_create

net/netfilter/ipset/ip_set_core.c:615: warning: ‘clash’ may be used uninitialized in this function

---
 net/netfilter/ipset/ip_set_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipset/ip_set_core.c +1 -1
index 8b1a54c..618a615 100644
@@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
 	      const struct nlmsghdr *nlh,
 	      const struct nlattr * const attr[])
 {
-	struct ip_set *set, *clash;
+	struct ip_set *set, *clash = NULL;
 	ip_set_id_t index = IPSET_INVALID_ID;
 	struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {};
 	const char *name, *typename;
Signature · 5 lines
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 22 lines · Shan Wei

net/netfilter/ipset/ip_set_core.c:615: warning: ?clash? may be used uninitialized in this function

---
 net/netfilter/ipset/ip_set_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipset/ip_set_core.c +1 -1
index 8b1a54c..618a615 100644
@@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
 	      const struct nlmsghdr *nlh,
 	      const struct nlattr * const attr[])
 {
-	struct ip_set *set, *clash;
+	struct ip_set *set, *clash = NULL;
 	ip_set_id_t index = IPSET_INVALID_ID;
 	struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {};
 	const char *name, *typename;
Signature · 1 line
1.6.3.3

Thanks, I applied your patch in my tree.

Patrick, please apply it too.

Best regards,
Jozsef
-
E-mail : [email protected], [email protected] PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics

          H-1525 Budapest 114, POB. 49, Hungary
author
#2 lore raw

Jozsef Kadlecsik wrote, at 03/04/2011 05:00 PM:

Quoted 27 lines · Shan Wei
Quoted 23 lines

net/netfilter/ipset/ip_set_core.c:615: warning: ?clash? may be used uninitialized in this function

---
 net/netfilter/ipset/ip_set_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipset/ip_set_core.c +1 -1
index 8b1a54c..618a615 100644
@@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
 	      const struct nlmsghdr *nlh,
 	      const struct nlattr * const attr[])
 {
-	struct ip_set *set, *clash;
+	struct ip_set *set, *clash = NULL;
 	ip_set_id_t index = IPSET_INVALID_ID;
 	struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {};
 	const char *name, *typename;
Signature · 1 line
1.6.3.3

Thanks, I applied your patch in my tree.

Quoted 4 lines

Patrick, please apply it too.

Thanks for your review.
Bad sob in first patch, fix it in new one.

================
[PATCH v2] netfilter:ipset: fix the compile warning in ip_set_create

net/netfilter/ipset/ip_set_core.c:615: warning: ‘clash’ may be used uninitialized in this function

---
 net/netfilter/ipset/ip_set_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/netfilter/ipset/ip_set_core.c +1 -1
index 8b1a54c..618a615 100644
@@ -612,7 +612,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
 	      const struct nlmsghdr *nlh,
 	      const struct nlattr * const attr[])
 {
-	struct ip_set *set, *clash;
+	struct ip_set *set, *clash = NULL;
 	ip_set_id_t index = IPSET_INVALID_ID;
 	struct nlattr *tb[IPSET_ATTR_CREATE_MAX+1] = {};
 	const char *name, *typename;

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Am 04.03.2011 12:27, schrieb Shan Wei:

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

Thanks, I applied your patch in my tree.

Patrick, please apply it too.

Thanks for your review.
Bad sob in first patch, fix it in new one.

Quoted 7 lines

================
[PATCH v2] netfilter:ipset: fix the compile warning in ip_set_create

net/netfilter/ipset/ip_set_core.c:615: warning: ‘clash’ may be used uninitialized in this function

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html