netfilter: nf_tables: use struct nft_set_iter in set element flush
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Jan 2017 17:30:08 +0000 (18:30 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 8 Feb 2017 13:16:18 +0000 (14:16 +0100)
Instead of struct nft_set_dump_args, remove unnecessary wrapper
structure.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 3643ce345b59838ce8801a13979e8bdc231a09dc..790ffed82930cc3afea793124a72fd8a158e0330 100644 (file)
@@ -3936,15 +3936,13 @@ static int nf_tables_delsetelem(struct net *net, struct sock *nlsk,
                return -EBUSY;
 
        if (nla[NFTA_SET_ELEM_LIST_ELEMENTS] == NULL) {
-               struct nft_set_dump_args args = {
-                       .iter   = {
-                               .genmask        = genmask,
-                               .fn             = nft_flush_set,
-                       },
+               struct nft_set_iter iter = {
+                       .genmask        = genmask,
+                       .fn             = nft_flush_set,
                };
-               set->ops->walk(&ctx, set, &args.iter);
+               set->ops->walk(&ctx, set, &iter);
 
-               return args.iter.err;
+               return iter.err;
        }
 
        nla_for_each_nested(attr, nla[NFTA_SET_ELEM_LIST_ELEMENTS], rem) {