]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
src: remove useless parameter from cache_flush()
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Jun 2019 10:22:10 +0000 (12:22 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Jun 2019 17:54:57 +0000 (19:54 +0200)
Command type is never used in cache_flush().

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/evaluate.c
src/rule.c

index b41825d000d6c0fc3d329d75dcafeb62d1d9e140..299485ffeeaabced97d5289102a3a790139d7c05 100644 (file)
@@ -639,8 +639,7 @@ extern int do_command(struct netlink_ctx *ctx, struct cmd *cmd);
 extern int cache_evaluate(struct nft_ctx *nft, struct list_head *cmds);
 extern int cache_update(struct nft_ctx *ctx, enum cmd_ops cmd,
                        struct list_head *msgs);
-extern void cache_flush(struct nft_ctx *ctx, enum cmd_ops cmd,
-                       struct list_head *msgs);
+extern void cache_flush(struct nft_ctx *ctx, struct list_head *msgs);
 extern void cache_release(struct nft_cache *cache);
 extern bool cache_is_complete(struct nft_cache *cache, enum cmd_ops cmd);
 
index 70c7e597f3b0e5dd2b776a7003bd6121450999f4..73a4be339ce1fafa919e8cbdf92fd359cd14ac3a 100644 (file)
@@ -3682,7 +3682,7 @@ static int cmd_evaluate_flush(struct eval_ctx *ctx, struct cmd *cmd)
 
        switch (cmd->obj) {
        case CMD_OBJ_RULESET:
-               cache_flush(ctx->nft, cmd->op, ctx->msgs);
+               cache_flush(ctx->nft, ctx->msgs);
                break;
        case CMD_OBJ_TABLE:
                /* Flushing a table does not empty the sets in the table nor remove
index 0c0fd07ec70cad3a9dadbd380710d56a0799ce03..4407b0b0ceaa09ecf3c7509c5fe8df4e172ed98c 100644 (file)
@@ -297,7 +297,7 @@ static void __cache_flush(struct list_head *table_list)
        }
 }
 
-void cache_flush(struct nft_ctx *nft, enum cmd_ops cmd, struct list_head *msgs)
+void cache_flush(struct nft_ctx *nft, struct list_head *msgs)
 {
        struct netlink_ctx ctx = {
                .list           = LIST_HEAD_INIT(ctx.list),