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: Tue, 6 Jun 2023 09:19:38 +0200
From: Daniel Machon <daniel.machon@...rochip.com>
To: <netdev@...r.kernel.org>
CC: <dsahern@...nel.org>, <stephen@...workplumber.org>, <petrm@...dia.com>,
	<UNGLinuxDriver@...rochip.com>, <daniel.machon@...rochip.com>
Subject: [PATCH iproute2-next v3 03/12] dcb: app: move colon printing out
 of callbacks

In preparation for changing the prototype of dcb_app_print_filtered(),
move the colon printing out of the callbacks, and into
dcb_app_print_filtered().

Signed-off-by: Daniel Machon <daniel.machon@...rochip.com>
---
 dcb/dcb_app.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/dcb/dcb_app.c b/dcb/dcb_app.c
index 644c37d36ffb..ed7930ae7b37 100644
--- a/dcb/dcb_app.c
+++ b/dcb/dcb_app.c
@@ -405,12 +405,12 @@ static bool dcb_app_is_port(const struct dcb_app *app)
 
 static int dcb_app_print_key_dec(__u16 protocol)
 {
-	return print_uint(PRINT_ANY, NULL, "%u:", protocol);
+	return print_uint(PRINT_ANY, NULL, "%u", protocol);
 }
 
 static int dcb_app_print_key_hex(__u16 protocol)
 {
-	return print_uint(PRINT_ANY, NULL, "%x:", protocol);
+	return print_uint(PRINT_ANY, NULL, "%x", protocol);
 }
 
 static int dcb_app_print_key_dscp(__u16 protocol)
@@ -419,17 +419,17 @@ static int dcb_app_print_key_dscp(__u16 protocol)
 
 
 	if (!is_json_context() && name != NULL)
-		return print_string(PRINT_FP, NULL, "%s:", name);
-	return print_uint(PRINT_ANY, NULL, "%u:", protocol);
+		return print_string(PRINT_FP, NULL, "%s", name);
+	return print_uint(PRINT_ANY, NULL, "%u", protocol);
 }
 
 static int dcb_app_print_key_pcp(__u16 protocol)
 {
 	/* Print in numerical form, if protocol value is out-of-range */
 	if (protocol > DCB_APP_PCP_MAX)
-		return print_uint(PRINT_ANY, NULL, "%u:", protocol);
+		return print_uint(PRINT_ANY, NULL, "%u", protocol);
 
-	return print_string(PRINT_ANY, NULL, "%s:", pcp_names[protocol]);
+	return print_string(PRINT_ANY, NULL, "%s", pcp_names[protocol]);
 }
 
 static void dcb_app_print_filtered(const struct dcb_app_table *tab,
@@ -454,7 +454,7 @@ static void dcb_app_print_filtered(const struct dcb_app_table *tab,
 
 		open_json_array(PRINT_JSON, NULL);
 		print_key(app->protocol);
-		print_uint(PRINT_ANY, NULL, "%u ", app->priority);
+		print_uint(PRINT_ANY, NULL, ":%u ", app->priority);
 		close_json_array(PRINT_JSON, NULL);
 	}
 

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ