diff mbox

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

Message ID 1375864297-9347-2-git-send-email-tomasz.bursztyka@linux.intel.com
State Accepted
Headers show

Commit Message

Tomasz Bursztyka Aug. 7, 2013, 8:31 a.m. UTC
Rulenum is already handled before the loop, making this test useless.

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

Comments

Pablo Neira Ayuso Aug. 7, 2013, 8:59 a.m. UTC | #1
On Wed, Aug 07, 2013 at 11:31:35AM +0300, Tomasz Bursztyka wrote:
> Rulenum is already handled before the loop, making this test useless.

This one was my fault.

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

Patch

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);