svn commit: r295426 - head/bin/dd

Edward Tomasz Napierala trasz at FreeBSD.org
Tue Feb 9 09:32:12 UTC 2016


Author: trasz
Date: Tue Feb  9 09:32:10 2016
New Revision: 295426
URL: https://svnweb.freebsd.org/changeset/base/295426

Log:
  Use proper functions for parsing the numeric values.
  
  Submitted by:	bde@
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/bin/dd/args.c

Modified: head/bin/dd/args.c
==============================================================================
--- head/bin/dd/args.c	Tue Feb  9 06:26:27 2016	(r295425)
+++ head/bin/dd/args.c	Tue Feb  9 09:32:10 2016	(r295426)
@@ -419,7 +419,7 @@ get_num(const char *val)
 	char *expr;
 
 	errno = 0;
-	num = strtouq(val, &expr, 0);
+	num = strtoumax(val, &expr, 0);
 	if (errno != 0)				/* Overflow or underflow. */
 		err(1, "%s", oper);
 	
@@ -469,7 +469,7 @@ get_off_t(const char *val)
 	char *expr;
 
 	errno = 0;
-	num = strtoq(val, &expr, 0);
+	num = strtoimax(val, &expr, 0);
 	if (errno != 0)				/* Overflow or underflow. */
 		err(1, "%s", oper);
 	


More information about the svn-src-all mailing list