Skip to content

Commit

Permalink
netfilter: ctnetlink: fix gcc warning during compilation
Browse files Browse the repository at this point in the history
This patch fixes a (bogus?) gcc warning during compilation:

net/netfilter/nf_conntrack_netlink.c:1234: warning: 'helpname' may be used uninitialized in this function
net/netfilter/nf_conntrack_netlink.c:991: warning: 'helpname' may be used uninitialized in this function

In fact, helpname is initialized by ctnetlink_parse_help() so
I cannot see a way to use it without being initialized.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Apr 22, 2009
1 parent cc29c70 commit 29fe1b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nlattr *cda[])
{
struct nf_conntrack_helper *helper;
struct nf_conn_help *help = nfct_help(ct);
char *helpname;
char *helpname = NULL;
int err;

/* don't change helper of sibling connections */
Expand Down Expand Up @@ -1231,7 +1231,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],

rcu_read_lock();
if (cda[CTA_HELP]) {
char *helpname;
char *helpname = NULL;

err = ctnetlink_parse_help(cda[CTA_HELP], &helpname);
if (err < 0)
Expand Down

0 comments on commit 29fe1b4

Please sign in to comment.