svn commit: r280680 - head/usr.bin/top

Kevin Lo kevlo at FreeBSD.org
Thu Mar 26 09:13:18 UTC 2015


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;
 			}


More information about the svn-src-all mailing list