From: Shan Wei <shanwei@cn.fujitsu.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter:ipset: fix the compile warning in ip_set_create
Date: Fri, 04 Mar 2011 19:27:05 +0800 [thread overview]
Message-ID: <4D70CC89.5020604@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1103040956050.29227@blackhole.kfki.hu>
Jozsef Kadlecsik wrote, at 03/04/2011 05:00 PM:
> On Fri, 4 Mar 2011, Shan Wei wrote:
>
>> net/netfilter/ipset/ip_set_core.c:615: warning: ?clash? may be used uninitialized in this function
>>
>> Signed-off-by: shanw <shanw@shanw-desktop.(none)>
>> ---
>> net/netfilter/ipset/ip_set_core.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
>> index 8b1a54c..618a615 100644
>> --- a/net/netfilter/ipset/ip_set_core.c
>> +++ b/net/netfilter/ipset/ip_set_core.c
>> @@ -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;
>> --
>> 1.6.3.3
>
> Thanks, I applied your patch in my tree.
>
> Patrick, please apply it too.
>
> Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
>
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
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
net/netfilter/ipset/ip_set_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index 8b1a54c..618a615 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-03-04 11:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 7:34 [PATCH] netfilter:ipset: fix the compile warning in ip_set_create Shan Wei
2011-03-04 9:00 ` Jozsef Kadlecsik
2011-03-04 11:27 ` Shan Wei [this message]
2011-03-08 14:38 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D70CC89.5020604@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).