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: --- startup/startup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'startup/startup.c') diff --git a/startup/startup.c b/startup/startup.c index e8c76d80..3cb3f31b 100644 --- a/startup/startup.c +++ b/startup/startup.c @@ -497,7 +497,7 @@ argz_task_insert_right (char **argz, size_t *argz_len, task_t task, } while (err == KERN_NAME_EXISTS); - if (asprintf (&arg, "--%s=%lu", argument, name) < 0) + if (asprintf (&arg, "--%s=%u", argument, name) < 0) return errno; err = argz_add (argz, argz_len, arg); @@ -1638,7 +1638,7 @@ do_mach_notify_dead_name (mach_port_t notify_port, boots[i].name); crash_mach (); } - error (0, 0, "BUG! Unexpected dead-name notification (name %#lx)", + error (0, 0, "BUG! Unexpected dead-name notification (name %#x)", name); crash_mach (); } -- cgit v1.2.3