Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Mar 2015 09:13:17 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r280680 - head/usr.bin/top
Message-ID:  <201503260913.t2Q9DHL6052798@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Thu Mar 26 09:13:16 2015
New Revision: 280680
URL: https://svnweb.freebsd.org/changeset/base/280680

Log:
  Print size_t's with %zu rather than "%zd.
  
  Reviewed by:	bde

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==============================================================================
--- head/usr.bin/top/machine.c	Thu Mar 26 08:38:53 2015	(r280679)
+++ head/usr.bin/top/machine.c	Thu Mar 26 09:13:16 2015	(r280680)
@@ -373,7 +373,7 @@ machine_init(struct statics *statics, ch
 	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
 			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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503260913.t2Q9DHL6052798>