summaryrefslogtreecommitdiffstats
path: root/iptables/xtables.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-09-19 15:17:08 +0200
committerFlorian Westphal <fw@strlen.de>2018-09-24 11:50:03 +0200
commit671e40a5f693029d806fa08c3df1e2015a99b6e8 (patch)
tree047e23353a484135f7c486e832854540d15107e8 /iptables/xtables.c
parent7c9a1521105aa515a272e2d04fa806bed8b43396 (diff)
xtables: Drop pointless check
All commands this block handles set p->chain. Also the pointer is dereferenced before, so no point in checking for it to be non-NULL. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables.c')
-rw-r--r--iptables/xtables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c
index 313b985b..d6afada9 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -1160,7 +1160,7 @@ void do_parse(struct nft_handle *h, int argc, char *argv[],
p->chain);
}
- if (p->chain && !nft_chain_exists(h, p->table, p->chain))
+ if (!nft_chain_exists(h, p->table, p->chain))
xtables_error(OTHER_PROBLEM,
"Chain '%s' does not exist", cs->jumpto);