netfilter: fix warning in net/netfilter/nf_conntrack_ftp.c
authorIngo Molnar <mingo@elte.hu>
Tue, 25 Nov 2008 17:23:03 +0000 (18:23 +0100)
committerPatrick McHardy <kaber@trash.net>
Tue, 25 Nov 2008 17:23:03 +0000 (18:23 +0100)
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: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_ftp.c

index 867cad6b3c8dd99e1a9014d4f91093542ecd7295..00fecc385f9b55e9aa6edb2452a7c6025f043618 100644 (file)
@@ -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;