svn commit: r253279 - head/sbin/nvmecontrol

Jim Harris jimharris at FreeBSD.org
Fri Jul 12 18:13:41 UTC 2013


Author: jimharris
Date: Fri Jul 12 18:13:41 2013
New Revision: 253279
URL: http://svnweb.freebsd.org/changeset/base/253279

Log:
  %d should be used for printing int32_t instead of %zd.
  
  clang does not complain about this - only gcc.
  
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/firmware.c

Modified: head/sbin/nvmecontrol/firmware.c
==============================================================================
--- head/sbin/nvmecontrol/firmware.c	Fri Jul 12 18:02:10 2013	(r253278)
+++ head/sbin/nvmecontrol/firmware.c	Fri Jul 12 18:13:41 2013	(r253279)
@@ -94,7 +94,7 @@ read_image_file(char *path, void **buf, 
 		    path, (intmax_t)sb.st_size);
 	filesize = (int32_t)sb.st_size;
 	if ((*buf = malloc(filesize)) == NULL)
-		errx(1, "unable to malloc %zd bytes", filesize);
+		errx(1, "unable to malloc %d bytes", filesize);
 	if ((*size = read(fd, *buf, filesize)) < 0)
 		err(1, "error reading '%s'", path);
 	/* XXX assuming no short reads */


More information about the svn-src-all mailing list