summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-09-17 17:53:31 +0200
committerPhil Sutter <phil@nwl.cc>2019-09-25 23:46:14 +0200
commitb19d239323dd9f732b24ad6c95101cf7a51c4b20 (patch)
tree9c335bdce9d382cd4599ad082624a80d31e44499 /iptables/nft.c
parent7c64eaf4b1b97ff69a7d9c5c13d4e9eff97d2cd1 (diff)
xtables_error() does not return
It's a define which resolves into a callback which in turn is declared with noreturn attribute. It will never return, therefore drop all explicit exit() calls or other dead code immediately following it. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 8047a51f..90bb0c63 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -2517,10 +2517,8 @@ int nft_rule_list(struct nft_handle *h, const char *chain, const char *table,
ops = nft_family_ops_lookup(h->family);
- if (!nft_is_table_compatible(h, table)) {
+ if (!nft_is_table_compatible(h, table))
xtables_error(OTHER_PROBLEM, "table `%s' is incompatible, use 'nft' tool.\n", table);
- return 0;
- }
list = nft_chain_list_get(h, table);
if (!list)
@@ -2620,10 +2618,8 @@ int nft_rule_list_save(struct nft_handle *h, const char *chain,
nft_xt_builtin_init(h, table);
- if (!nft_is_table_compatible(h, table)) {
+ if (!nft_is_table_compatible(h, table))
xtables_error(OTHER_PROBLEM, "table `%s' is incompatible, use 'nft' tool.\n", table);
- return 0;
- }
list = nft_chain_list_get(h, table);
if (!list)