Patchwork [nftables,2/4] netlink: suppress useless variable

login
register
mail settings
Submitter Eric Leblond
Date Oct. 2, 2013, 11:08 p.m.
Message ID <1380755288-17587-3-git-send-email-eric@regit.org>
Download mbox | patch
Permalink /patch/280187/
State Accepted
Headers show

Comments

Eric Leblond - Oct. 2, 2013, 11:08 p.m.
Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/netlink.c | 3 ---
 1 file changed, 3 deletions(-)

Patch

diff --git a/src/netlink.c b/src/netlink.c
index b1e44ad..6f3002b 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -441,7 +441,6 @@  static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h,
 			       const struct location *loc)
 {
 	struct nft_rule_list *rule_cache;
-	struct nft_rule *nlr;
 
 	rule_cache = mnl_nft_rule_dump(nf_sock, h->family);
 	if (rule_cache == NULL)
@@ -450,9 +449,7 @@  static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h,
 					strerror(errno));
 
 	mnl_batch_begin();
-	nlr = alloc_nft_rule(h);
 	nft_rule_list_foreach(rule_cache, flush_rule_cb, ctx);
-	nft_rule_free(nlr);
 	nft_rule_list_free(rule_cache);
 	mnl_batch_end();
 	return 0;