From 0e260c69746ea4ff101b6f66bf40de8426cfccbd Mon Sep 17 00:00:00 2001
From: Phil Sutter <phil@nwl.cc>
Date: Thu, 20 Dec 2018 16:09:06 +0100
Subject: [PATCH] nft: Reduce __nft_rule_del() signature
The function does not use passed struct nftnl_rule_list, so remove it
from its parameters.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 9975b6da9f926994bcea8ae788e47aab4b5b235e)
Signed-off-by: Phil Sutter <psutter@redhat.com>
---
iptables/nft.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/iptables/nft.c b/iptables/nft.c
index 5032c718b33a9..befd9f4dd9026 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -1946,8 +1946,7 @@ void nft_table_new(struct nft_handle *h, const char *table)
nft_xt_builtin_init(h, table);
}
-static int __nft_rule_del(struct nft_handle *h, struct nftnl_rule_list *list,
- struct nftnl_rule *r)
+static int __nft_rule_del(struct nft_handle *h, struct nftnl_rule *r)
{
int ret;
@@ -2046,7 +2045,7 @@ int nft_rule_delete(struct nft_handle *h, const char *chain,
r = nft_rule_find(h, list, chain, table, data, -1);
if (r != NULL) {
- ret =__nft_rule_del(h, list, r);
+ ret =__nft_rule_del(h, r);
if (ret < 0)
errno = ENOMEM;
if (verbose)
@@ -2151,7 +2150,7 @@ int nft_rule_delete_num(struct nft_handle *h, const char *chain,
r = nft_rule_find(h, list, chain, table, NULL, rulenum);
if (r != NULL) {
DEBUGP("deleting rule by number %d\n", rulenum);
- ret = __nft_rule_del(h, list, r);
+ ret = __nft_rule_del(h, r);
if (ret < 0)
errno = ENOMEM;
} else
--
2.21.0