From cf7f8a9de8215b551fceeab8bec78bfea2536c02 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Thu, 26 Mar 2015 09:13:16 +0000 Subject: [PATCH] Print size_t's with %zu rather than "%zd. Reviewed by: bde --- usr.bin/top/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 0a745214f460..20be9352be98 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -373,7 +373,7 @@ machine_init(struct statics *statics, char do_unames) size = sizeof(long) * maxcpu * CPUSTATES; times = malloc(size); if (times == NULL) - err(1, "malloc %zd bytes", size); + err(1, "malloc %zu bytes", size); if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1) err(1, "sysctlbyname kern.cp_times"); pcpu_cp_time = calloc(1, size); @@ -1004,7 +1004,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) argbuflen = cmdlen * 4; argbuf = (char *)malloc(argbuflen + 1); if (argbuf == NULL) { - warn("malloc(%zd)", argbuflen + 1); + warn("malloc(%zu)", argbuflen + 1); free(cmdbuf); return NULL; }