]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: cache: Fix for unused variable warnings
authorPhil Sutter <phil@nwl.cc>
Fri, 13 Mar 2020 12:00:56 +0000 (13:00 +0100)
committerPhil Sutter <phil@nwl.cc>
Mon, 16 Mar 2020 12:15:09 +0000 (13:15 +0100)
Loop index variable was left in place after removing the loops.

Fixes: 39ec645093baa ("nft: cache: Simplify chain list allocation")
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cache.c

index 0dd131e1f70f5cfab659250f5f8817fefd9e1082..e3c965573918722714319528dcd06dcc50538a37 100644 (file)
@@ -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);