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@xxxxxx> --- iptables/xtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptables/xtables.c b/iptables/xtables.c index 0c16bb5a682fd..bd7aebfd8bdbe 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -1164,7 +1164,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); -- 2.18.0