[iptables-nftables PATCH 1/3] nft: Remove useless test on rulenum in nft_rule_list()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rulenum is already handled before the loop, making this test useless.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@xxxxxxxxxxxxxxx>
---
 iptables/nft.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/iptables/nft.c b/iptables/nft.c
index a87d303..15c50a7 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -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);
 
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux