[iptables PATCH 08/17] xtables: Get rid of nft_ipv{4,6}_print_header()

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

 



Both functions are identical, just passing all their parameters 1:1 to
print_header() shared function. So just replace them by the latter.

Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 iptables/nft-ipv4.c | 10 +---------
 iptables/nft-ipv6.c | 10 +---------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c
index 36258c9796c84..9db828172ae20 100644
--- a/iptables/nft-ipv4.c
+++ b/iptables/nft-ipv4.c
@@ -246,14 +246,6 @@ static void nft_ipv4_parse_immediate(const char *jumpto, bool nft_goto,
 		cs->fw.ip.flags |= IPT_F_GOTO;
 }
 
-static void nft_ipv4_print_header(unsigned int format, const char *chain,
-				  const char *pol,
-				  const struct xt_counters *counters,
-				  bool basechain, uint32_t refs)
-{
-	print_header(format, chain, pol, counters, basechain, refs);
-}
-
 static void print_ipv4_addr(const struct iptables_command_state *cs,
 			    unsigned int format)
 {
@@ -512,7 +504,7 @@ struct nft_family_ops nft_family_ops_ipv4 = {
 	.parse_meta		= nft_ipv4_parse_meta,
 	.parse_payload		= nft_ipv4_parse_payload,
 	.parse_immediate	= nft_ipv4_parse_immediate,
-	.print_header		= nft_ipv4_print_header,
+	.print_header		= print_header,
 	.print_firewall		= nft_ipv4_print_firewall,
 	.save_firewall		= nft_ipv4_save_firewall,
 	.save_counters		= nft_ipv4_save_counters,
diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c
index 419260199ba09..018f1d3f73aa0 100644
--- a/iptables/nft-ipv6.c
+++ b/iptables/nft-ipv6.c
@@ -183,14 +183,6 @@ static void nft_ipv6_parse_immediate(const char *jumpto, bool nft_goto,
 		cs->fw6.ipv6.flags |= IP6T_F_GOTO;
 }
 
-static void nft_ipv6_print_header(unsigned int format, const char *chain,
-				  const char *pol,
-				  const struct xt_counters *counters,
-				  bool basechain, uint32_t refs)
-{
-	print_header(format, chain, pol, counters, basechain, refs);
-}
-
 static void print_ipv6_addr(const struct iptables_command_state *cs,
 			    unsigned int format)
 {
@@ -467,7 +459,7 @@ struct nft_family_ops nft_family_ops_ipv6 = {
 	.parse_meta		= nft_ipv6_parse_meta,
 	.parse_payload		= nft_ipv6_parse_payload,
 	.parse_immediate	= nft_ipv6_parse_immediate,
-	.print_header		= nft_ipv6_print_header,
+	.print_header		= print_header,
 	.print_firewall		= nft_ipv6_print_firewall,
 	.save_firewall		= nft_ipv6_save_firewall,
 	.save_counters		= nft_ipv6_save_counters,
-- 
2.18.0

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