From c644533e2a8cd395997609f7e33b1e38c27e40f0 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Mon, 5 Dec 2022 01:34:56 -0500 Subject: Fix *printf specifier for user space mach ports. mach_port_t are mach_port_name_t and thus require %u instead of %lu. Message-Id: --- libshouldbeinlibc/xportinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libshouldbeinlibc/xportinfo.c') diff --git a/libshouldbeinlibc/xportinfo.c b/libshouldbeinlibc/xportinfo.c index 47e6dd9a..2a6d6f69 100644 --- a/libshouldbeinlibc/xportinfo.c +++ b/libshouldbeinlibc/xportinfo.c @@ -35,7 +35,7 @@ print_xlated_port_info (mach_port_t name, mach_port_type_t type, error_t err = port_name_xlator_xlate (x, name, type, &name, &type); if (! err) { - fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6lx => " : "%6lu => ", + fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6x => " : "%6u => ", old_name); err = print_port_info (name, type, x->to_task, show, stream); } -- cgit v1.2.3