]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: Remove useless test on rulenum in nft_rule_list()
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 7 Aug 2013 08:31:35 +0000 (11:31 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:42 +0000 (23:50 +0100)
Rulenum is already handled before the loop, making this test useless.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/nft.c

index a87d30318cf82471cb4ee6dee53be154b4cadf42..15c50a756f9479672c2ae566949ae551e496d3e6 100644 (file)
@@ -2537,10 +2537,9 @@ int nft_rule_list(struct nft_handle *h, const char *chain, const char *table,
                if (found)
                        printf("\n");
 
-               if (!rulenum) {
-                       print_header(format, chain_name, policy_name[policy],
+               print_header(format, chain_name, policy_name[policy],
                                     &ctrs, basechain, refs);
-               }
+
                __nft_rule_list(h, chain_name, table,
                                rulenum, format, print_firewall);