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

Commit d6e8cc6c authored by Ingo Molnar's avatar Ingo Molnar Committed by Patrick McHardy
Browse files

netfilter: fix warning in net/netfilter/nf_conntrack_ftp.c



this warning:

  net/netfilter/nf_conntrack_ftp.c: In function 'help':
  net/netfilter/nf_conntrack_ftp.c:360: warning: 'matchoff' may be used uninitialized in this function
  net/netfilter/nf_conntrack_ftp.c:360: warning: 'matchlen' may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between find_pattern(), 'found', 'matchoff' and 'matchlen'.

Annotate it.

Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 65f233fb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ static int help(struct sk_buff *skb,
	int ret;
	u32 seq;
	int dir = CTINFO2DIR(ctinfo);
	unsigned int matchlen, matchoff;
	unsigned int uninitialized_var(matchlen), uninitialized_var(matchoff);
	struct nf_ct_ftp_master *ct_ftp_info = &nfct_help(ct)->help.ct_ftp_info;
	struct nf_conntrack_expect *exp;
	union nf_inet_addr *daddr;