]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: Reduce __nft_rule_del() signature
authorPhil Sutter <phil@nwl.cc>
Thu, 20 Dec 2018 15:09:06 +0000 (16:09 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 27 Dec 2018 18:19:01 +0000 (19:19 +0100)
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>
iptables/nft.c

index 5032c718b33a9590e7101b1f8292d744a7b669b6..befd9f4dd9026bcf62210d261c4b4e817704a04e 100644 (file)
@@ -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