diff options
author | delphij <delphij@FreeBSD.org> | 2015-07-15 19:21:26 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-07-15 19:21:26 +0000 |
commit | 2a25cee78ab1d37e7d2bc40ae675646974d99f56 (patch) | |
tree | b0302ac4be59e104f4e1e54014561a1389397192 /contrib/ntp/libntp/atoint.c | |
parent | a0741a75537b2e0514472ac3b28afc55a7846c30 (diff) | |
download | FreeBSD-src-2a25cee78ab1d37e7d2bc40ae675646974d99f56.zip FreeBSD-src-2a25cee78ab1d37e7d2bc40ae675646974d99f56.tar.gz |
MFC r280849,280915-280916,281015-281016,282097,282408,282415,283542,
284864,285169-285170,285435:
ntp 4.2.8p3.
Relnotes: yes
Approved by: re (?)
Diffstat (limited to 'contrib/ntp/libntp/atoint.c')
-rw-r--r-- | contrib/ntp/libntp/atoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ntp/libntp/atoint.c b/contrib/ntp/libntp/atoint.c index 46cd96d..9da8c13 100644 --- a/contrib/ntp/libntp/atoint.c +++ b/contrib/ntp/libntp/atoint.c @@ -1,6 +1,7 @@ /* * atoint - convert an ascii string to a signed long, with error checking */ +#include <config.h> #include <sys/types.h> #include <ctype.h> @@ -34,7 +35,7 @@ atoint( u = 0; while (*cp != '\0') { - if (!isdigit((int)*cp)) + if (!isdigit((unsigned char)*cp)) return 0; if (u > 214748364 || (u == 214748364 && *cp > oflow_digit)) return 0; /* overflow */ |