Use proper functions for parsing the numeric values.

Submitted by:	bde@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2016-02-09 09:32:10 +00:00
parent c00a03a11d
commit d819236121
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295426

View File

@ -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);