svn commit: r189703 - head/sbin/recoverdisk

Ed Schouten ed at FreeBSD.org
Wed Mar 11 10:40:40 PDT 2009


Author: ed
Date: Wed Mar 11 17:40:39 2009
New Revision: 189703
URL: http://svn.freebsd.org/changeset/base/189703

Log:
  Also use %zu to print the allocation size when malloc(3) fails.
  
  Discussed with:	phk

Modified:
  head/sbin/recoverdisk/recoverdisk.c

Modified: head/sbin/recoverdisk/recoverdisk.c
==============================================================================
--- head/sbin/recoverdisk/recoverdisk.c	Wed Mar 11 17:15:33 2009	(r189702)
+++ head/sbin/recoverdisk/recoverdisk.c	Wed Mar 11 17:40:39 2009	(r189703)
@@ -226,7 +226,7 @@ main(int argc, char * const argv[])
 
 	buf = malloc(bigsize);
 	if (buf == NULL)
-		err(1, "Cannot allocate %jd bytes buffer", (intmax_t)bigsize);
+		err(1, "Cannot allocate %zu bytes buffer", bigsize);
 
 	if (argc > 1) {
 		fdw = open(argv[1], flags, DEFFILEMODE);


More information about the svn-src-all mailing list