From 671e40a5f693029d806fa08c3df1e2015a99b6e8 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 19 Sep 2018 15:17:08 +0200 Subject: 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 Signed-off-by: Florian Westphal --- iptables/xtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3