diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-12 16:26:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-03-12 16:26:16 +0000 |
commit | bab5c5fac0fba6b6e0735e8bd9dfecb7bd474700 (patch) | |
tree | c6bea75d9210d3d657b34686d6592f329a01e3d9 /cpukit/libnetworking/libc/res_debug.c | |
parent | 3c02c9dd47039d8c33abeaf5b85b55f654ae805e (diff) |
2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.c,
httpd/misc.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c,
libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c,
libfs/src/dosfs/msdos_misc.c, libfs/src/nfsclient/src/nfs.c,
libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c,
libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c,
libmisc/shell/shell.c, libmisc/shell/shell_makeargs.c,
libmisc/uuid/parse.c, libnetworking/libc/gethostbydns.c,
libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c,
libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c,
libnetworking/libc/inet_network.c, libnetworking/libc/res_debug.c,
libnetworking/libc/res_init.c, libnetworking/libc/res_query.c,
libnetworking/rtems/rtems_mii_ioctl.c,
score/src/objectgetnameasstring.c: Readdress use of ctype methods per
recommendation from D.J. Delorie on the newlib mailing list. We
should pass an unsigned char into these methods.
Diffstat (limited to 'cpukit/libnetworking/libc/res_debug.c')
-rw-r--r-- | cpukit/libnetworking/libc/res_debug.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/cpukit/libnetworking/libc/res_debug.c b/cpukit/libnetworking/libc/res_debug.c index f7a36abf25..c4792e3e72 100644 --- a/cpukit/libnetworking/libc/res_debug.c +++ b/cpukit/libnetworking/libc/res_debug.c @@ -579,14 +579,14 @@ precsize_aton( cp = *strptr; - while (isdigit((int)*cp)) + while (isdigit((unsigned char)*cp)) mval = mval * 10 + (*cp++ - '0'); if (*cp == '.') { /* centimeters */ cp++; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { cmval = (*cp++ - '0') * 10; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { cmval += (*cp++ - '0'); } } @@ -620,44 +620,44 @@ latlon2ul( cp = *latlonstrptr; - while (isdigit((int)*cp)) + while (isdigit((unsigned char)*cp)) deg = deg * 10 + (*cp++ - '0'); - while (isspace((int)*cp)) + while (isspace((unsigned char)*cp)) cp++; - if (!(isdigit((int)*cp))) + if (!(isdigit((unsigned char)*cp))) goto fndhemi; - while (isdigit((int)*cp)) + while (isdigit((unsigned char)*cp)) min = min * 10 + (*cp++ - '0'); - while (isspace((int)*cp)) + while (isspace((unsigned char)*cp)) cp++; - if (!(isdigit((int)*cp))) + if (!(isdigit((unsigned char)*cp))) goto fndhemi; - while (isdigit((int)*cp)) + while (isdigit((unsigned char)*cp)) secs = secs * 10 + (*cp++ - '0'); if (*cp == '.') { /* decimal seconds */ cp++; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { secsfrac = (*cp++ - '0') * 100; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { secsfrac += (*cp++ - '0') * 10; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { secsfrac += (*cp++ - '0'); } } } } - while (!isspace((int)*cp)) /* if any trailing garbage */ + while (!isspace((unsigned char)*cp)) /* if any trailing garbage */ cp++; - while (isspace((int)*cp)) + while (isspace((unsigned char)*cp)) cp++; fndhemi: @@ -695,10 +695,10 @@ latlon2ul( cp++; /* skip the hemisphere */ - while (!isspace((int)*cp)) /* if any trailing garbage */ + while (!isspace((unsigned char)*cp)) /* if any trailing garbage */ cp++; - while (isspace((int)*cp)) /* move to next field */ + while (isspace((unsigned char)*cp)) /* move to next field */ cp++; *latlonstrptr = cp; @@ -756,14 +756,14 @@ loc_aton( if (*cp == '+') cp++; - while (isdigit((int)*cp)) + while (isdigit((unsigned char)*cp)) altmeters = altmeters * 10 + (*cp++ - '0'); if (*cp == '.') { /* decimal meters */ cp++; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { altfrac = (*cp++ - '0') * 10; - if (isdigit((int)*cp)) { + if (isdigit((unsigned char)*cp)) { altfrac += (*cp++ - '0'); } } @@ -771,10 +771,10 @@ loc_aton( alt = (10000000 + (altsign * (altmeters * 100 + altfrac))); - while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */ + while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ cp++; - while (isspace((int)*cp) && (cp < maxcp)) + while (isspace((unsigned char)*cp) && (cp < maxcp)) cp++; if (cp >= maxcp) @@ -782,10 +782,10 @@ loc_aton( siz = precsize_aton(&cp); - while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */ + while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ cp++; - while (isspace((int)*cp) && (cp < maxcp)) + while (isspace((unsigned char)*cp) && (cp < maxcp)) cp++; if (cp >= maxcp) @@ -793,10 +793,10 @@ loc_aton( hp = precsize_aton(&cp); - while (!isspace((int)*cp) && (cp < maxcp)) /* if trailing garbage or m */ + while (!isspace((unsigned char)*cp) && (cp < maxcp)) /* if trailing garbage or m */ cp++; - while (isspace((int)*cp) && (cp < maxcp)) + while (isspace((unsigned char)*cp) && (cp < maxcp)) cp++; if (cp >= maxcp) |