lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 13 Apr 2024 15:04:02 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <stephen@...workplumber.org>
Subject: [PATCH iproute2-next 1/7] tc/u32: remove FILE argument

The pretty printing routines no longer use the file handle.

Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
---
 tc/f_u32.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tc/f_u32.c b/tc/f_u32.c
index 8a241310..f8e1ff6e 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -820,7 +820,7 @@ static int parse_hashkey(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
 	return 0;
 }
 
-static void print_ipv4(FILE *f, const struct tc_u32_key *key)
+static void print_ipv4(const struct tc_u32_key *key)
 {
 	char abuf[256];
 
@@ -895,7 +895,7 @@ static void print_ipv4(FILE *f, const struct tc_u32_key *key)
 	close_json_object();
 }
 
-static void print_ipv6(FILE *f, const struct tc_u32_key *key)
+static void print_ipv6(const struct tc_u32_key *key)
 {
 	char abuf[256];
 
@@ -971,7 +971,7 @@ static void print_ipv6(FILE *f, const struct tc_u32_key *key)
 	close_json_object();
 }
 
-static void print_raw(FILE *f, const struct tc_u32_key *key)
+static void print_raw(const struct tc_u32_key *key)
 {
 	open_json_object("match");
 	print_nl();
@@ -985,14 +985,14 @@ static void print_raw(FILE *f, const struct tc_u32_key *key)
 static const struct {
 	__u16 proto;
 	__u16 pad;
-	void (*pprinter)(FILE *f, const struct tc_u32_key *key);
+	void (*pprinter)(const struct tc_u32_key *key);
 } u32_pprinters[] = {
 	{0,	   0, print_raw},
 	{ETH_P_IP, 0, print_ipv4},
 	{ETH_P_IPV6, 0, print_ipv6},
 };
 
-static void show_keys(FILE *f, const struct tc_u32_key *key)
+static void show_keys(const struct tc_u32_key *key)
 {
 	int i = 0;
 
@@ -1002,7 +1002,7 @@ static void show_keys(FILE *f, const struct tc_u32_key *key)
 	for (i = 0; i < ARRAY_SIZE(u32_pprinters); i++) {
 		if (u32_pprinters[i].proto == ntohs(f_proto)) {
 show_k:
-			u32_pprinters[i].pprinter(f, key);
+			u32_pprinters[i].pprinter(key);
 			return;
 		}
 	}
@@ -1333,7 +1333,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
 			int i;
 
 			for (i = 0; i < sel->nkeys; i++) {
-				show_keys(f, sel->keys + i);
+				show_keys(sel->keys + i);
 				if (show_stats && NULL != pf)
 					print_u64(PRINT_ANY, "success", " (success %llu ) ",
 						  pf->kcnts[i]);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ