Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74664cf2 authored by Colin Ian King's avatar Colin Ian King Committed by Pablo Neira Ayuso
Browse files

netfilter: arp_tables: remove redundant check on ret being non-zero



ret is initialized to zero and if it is set to non-zero in the
xt_entry_foreach loop then we exit via the out_free label. Hence
the check for ret being non-zero is redundant and can be removed.

Detected by CoverityScan, CID#1357132 ("Logically Dead Code")

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 13fa745d
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -562,8 +562,6 @@ static int translate_table(struct xt_table_info *newinfo, void *entry0,
		    XT_ERROR_TARGET) == 0)
		    XT_ERROR_TARGET) == 0)
			++newinfo->stacksize;
			++newinfo->stacksize;
	}
	}
	if (ret != 0)
		goto out_free;


	ret = -EINVAL;
	ret = -EINVAL;
	if (i != repl->num_entries)
	if (i != repl->num_entries)