Skip to contentSkip to conversation

nft: cache: Fix for unused variable warnings

PATCH New Phil Sutter 1 participant 1 message Mar 13, 2020 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 nft: cache: Fix for unused variable warnings

Loop index variable was left in place after removing the loops.

Fixes 39ec645093baa ("nft: cache: Simplify chain list allocation")
---
 iptables/nft-cache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
iptables/nft-cache.c +1 -3
index 0dd131e1f70f5..e3c9655739187 100644
@@ -331,7 +331,7 @@ static int fetch_chain_cache(struct nft_handle *h,
 	};
 	char buf[16536];
 	struct nlmsghdr *nlh;
-	int i, ret;
+	int ret;
 
 	if (t && chain) {
 		struct nftnl_chain *c = nftnl_chain_alloc();
@@ -516,8 +516,6 @@ void nft_build_cache(struct nft_handle *h, struct nftnl_chain *c)
 
 void nft_fake_cache(struct nft_handle *h)
 {
-	int i;
-
 	fetch_table_cache(h);
 	init_chain_cache(h);
 
Signature · 1 line
2.25.1