summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-04-07 12:58:13 +0000
committerbde <bde@FreeBSD.org>1996-04-07 12:58:13 +0000
commit5e84eea81d8753b9129172f8b7c86722ff473054 (patch)
tree810ced2d14432a5670475aceb798aab3356d772a /usr.bin/find
parentabba8530a030569fbd8c5248195bad4bb3013f8c (diff)
downloadFreeBSD-src-5e84eea81d8753b9129172f8b7c86722ff473054.zip
FreeBSD-src-5e84eea81d8753b9129172f8b7c86722ff473054.tar.gz
Use strtoq() instead of strtol() so that large inums, and sizes can be
specified. Not fixed: specification of large uids and gids; silent truncation of unrepresentable values.
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/function.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c
index 92892ba..ffd7ff1 100644
--- a/usr.bin/find/function.c
+++ b/usr.bin/find/function.c
@@ -76,12 +76,12 @@ static PLAN *palloc __P((enum ntype, int (*) __P((PLAN *, FTSENT *))));
* find_parsenum --
* Parse a string of the form [+-]# and return the value.
*/
-static long
+static long long
find_parsenum(plan, option, vp, endch)
PLAN *plan;
char *option, *vp, *endch;
{
- long value;
+ long long value;
char *endchar, *str; /* Pointer to character ending conversion. */
/* Determine comparison from leading + or -. */
@@ -101,11 +101,11 @@ find_parsenum(plan, option, vp, endch)
}
/*
- * Convert the string with strtol(). Note, if strtol() returns zero
+ * Convert the string with strtoq(). Note, if strtoq() returns zero
* and endchar points to the beginning of the string we know we have
* a syntax error.
*/
- value = strtol(str, &endchar, 10);
+ value = strtoq(str, &endchar, 10);
if (value == 0 && endchar == str)
errx(1, "%s: %s: illegal numeric value", option, vp);
if (endchar[0] && (endch == NULL || endchar[0] != *endch))
OpenPOWER on IntegriCloud