summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/libntp/octtoint.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-07-15 19:21:26 +0000
committerdelphij <delphij@FreeBSD.org>2015-07-15 19:21:26 +0000
commit2a25cee78ab1d37e7d2bc40ae675646974d99f56 (patch)
treeb0302ac4be59e104f4e1e54014561a1389397192 /contrib/ntp/libntp/octtoint.c
parenta0741a75537b2e0514472ac3b28afc55a7846c30 (diff)
downloadFreeBSD-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/octtoint.c')
-rw-r--r--contrib/ntp/libntp/octtoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ntp/libntp/octtoint.c b/contrib/ntp/libntp/octtoint.c
index f792b2b..e519601 100644
--- a/contrib/ntp/libntp/octtoint.c
+++ b/contrib/ntp/libntp/octtoint.c
@@ -2,6 +2,7 @@
* octtoint - convert an ascii string in octal to an unsigned
* long, with error checking
*/
+#include <config.h>
#include <stdio.h>
#include <ctype.h>
@@ -23,7 +24,7 @@ octtoint(
u = 0;
while (*cp != '\0') {
- if (!isdigit((int)*cp) || *cp == '8' || *cp == '9')
+ if (!isdigit((unsigned char)*cp) || *cp == '8' || *cp == '9')
return 0;
if (u >= 0x20000000)
return 0; /* overflow */
OpenPOWER on IntegriCloud