diff options
Diffstat (limited to 'usr.sbin/nsd/compat/strptime.c')
-rw-r--r-- | usr.sbin/nsd/compat/strptime.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/nsd/compat/strptime.c b/usr.sbin/nsd/compat/strptime.c index 0c61cc9008a..e6eb375918f 100644 --- a/usr.sbin/nsd/compat/strptime.c +++ b/usr.sbin/nsd/compat/strptime.c @@ -10,7 +10,7 @@ * - Does not properly processes year day * * LICENSE - * Copyright (c) 2008, NLnet Labs, Matthijs Mekking + * Copyright (c) 2008, NLnet Labs, Matthijs Mekking. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -91,7 +91,7 @@ str2int(const char **buf, int max) { int ret=0, count=0; - while (*buf[0] != '\0' && isdigit(*buf[0]) && count<max) { + while (*buf[0] != '\0' && isdigit((unsigned char)*buf[0]) && count<max) { ret = ret*10 + (*buf[0] - '0'); (*buf)++; count++; @@ -111,7 +111,7 @@ nsd_strptime(const char *s, const char *format, struct tm *tm) int c, alt_format, ret; int split_year = 0; - while ((c = *format) != '\0') { + while ((c = (unsigned char)*format) != '\0') { alt_format = 0; /* whitespace, literal or format */ @@ -119,7 +119,7 @@ nsd_strptime(const char *s, const char *format, struct tm *tm) /** whitespace matches zero or more whitespace characters in the * input string. **/ - while (isspace(*s)) + while (isspace((unsigned char)*s)) s++; } else if (c == '%') { /* format */ @@ -225,7 +225,7 @@ nsd_strptime(const char *s, const char *format, struct tm *tm) break; case 'n': /* arbitrary whitespace */ case 't': - while (isspace(*s)) + while (isspace((unsigned char)*s)) s++; break; case 'p': /* am pm */ |