summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-02-28 11:31:15 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2017-03-06 18:04:37 +0100
commit74664cf286dc0d2bf6960293cb219e5f741ac92b (patch)
treef2a3d857d155dc9d25314a0dc374c2588f8b17d2 /net/ipv4
parent13fa745da251606fcdbf58acd6b4a551bea6ae99 (diff)
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: Colin Ian King <colin.king@canonical.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/arp_tables.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 6241a81fd7f5..f17dab1dee6e 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -562,8 +562,6 @@ static int translate_table(struct xt_table_info *newinfo, void *entry0,
XT_ERROR_TARGET) == 0)
++newinfo->stacksize;
}
- if (ret != 0)
- goto out_free;
ret = -EINVAL;
if (i != repl->num_entries)