]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: Fix a minor compilation warning
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fri, 6 Sep 2013 07:51:48 +0000 (10:51 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:45 +0000 (23:50 +0100)
nft-shared.c: In function ‘nft_rule_to_iptables_command_state’:
nft-shared.c:454:22: warning: ‘jumpto’ may be used uninitialized in this function [-Wmaybe-uninitialized]
nft-shared.c:432:14: note: ‘jumpto’ was declared here

All verdicts are managed and jumpto has to get a value, but since
the compiler complains, let's fix it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft-shared.c

index cdc3f835af6a0a6bab95774e80ca8127884ad4de..5681e26430f479975f0049641645098da5da19e0 100644 (file)
@@ -429,7 +429,7 @@ nft_parse_immediate(struct nft_rule_expr *e, struct nft_rule_expr_iter *iter,
        int verdict = nft_rule_expr_get_u32(e, NFT_EXPR_IMM_VERDICT);
        const char *chain = nft_rule_expr_get_str(e, NFT_EXPR_IMM_CHAIN);
        struct nft_family_ops *ops;
-       const char *jumpto;
+       const char *jumpto = NULL;
        bool nft_goto = false;
 
        /* Standard target? */