summaryrefslogtreecommitdiffstats
path: root/cpukit/httpd
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-12 16:26:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-12 16:26:16 +0000
commitbab5c5fac0fba6b6e0735e8bd9dfecb7bd474700 (patch)
treec6bea75d9210d3d657b34686d6592f329a01e3d9 /cpukit/httpd
parent2010-03-12 Sebastian Huber <Sebastian.Huber@embedded-brains.de> (diff)
downloadrtems-bab5c5fac0fba6b6e0735e8bd9dfecb7bd474700.tar.bz2
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/httpd')
-rw-r--r--cpukit/httpd/asp.c4
-rw-r--r--cpukit/httpd/ejparse.c8
-rw-r--r--cpukit/httpd/emfdb.c2
-rw-r--r--cpukit/httpd/misc.c4
-rw-r--r--cpukit/httpd/um.c2
-rw-r--r--cpukit/httpd/webs.c4
-rw-r--r--cpukit/httpd/websuemf.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/cpukit/httpd/asp.c b/cpukit/httpd/asp.c
index 26fcac3a3c..b31236fbfe 100644
--- a/cpukit/httpd/asp.c
+++ b/cpukit/httpd/asp.c
@@ -287,7 +287,7 @@ static char_t *strtokcmp(char_t *s1, char_t *s2)
s1 = skipWhite(s1);
len = gstrlen(s2);
- for (len = gstrlen(s2); len > 0 && (tolower((int)*s1) == tolower((int)*s2)); len--) {
+ for (len = gstrlen(s2); len > 0 && (tolower((unsigned char)*s1) == tolower((unsigned char)*s2)); len--) {
if (*s2 == '\0') {
return s1;
}
@@ -312,7 +312,7 @@ static char_t *skipWhite(char_t *s)
if (s == NULL) {
return s;
}
- while (*s && gisspace((int)*s)) {
+ while (*s && gisspace((unsigned char)*s)) {
s++;
}
return s;
diff --git a/cpukit/httpd/ejparse.c b/cpukit/httpd/ejparse.c
index 59fc785752..f2e97a221b 100644
--- a/cpukit/httpd/ejparse.c
+++ b/cpukit/httpd/ejparse.c
@@ -1144,7 +1144,7 @@ static int evalCond(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
a_assert(rel > 0);
lval = 0;
- if (gisdigit((int)*lhs) && gisdigit((int)*rhs)) {
+ if (gisdigit((unsigned char)*lhs) && gisdigit((unsigned char)*rhs)) {
l = gatoi(lhs);
r = gatoi(rhs);
switch (rel) {
@@ -1159,7 +1159,7 @@ static int evalCond(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
return -1;
}
} else {
- if (!gisdigit((int)*lhs)) {
+ if (!gisdigit((unsigned char)*lhs)) {
ejError(ep, T("Conditional must be numeric"), lhs);
} else {
ejError(ep, T("Conditional must be numeric"), rhs);
@@ -1190,7 +1190,7 @@ static int evalExpr(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
*/
numeric = 1;
for (cp = lhs; *cp; cp++) {
- if (!gisdigit((int)*cp)) {
+ if (!gisdigit((unsigned char)*cp)) {
numeric = 0;
break;
}
@@ -1198,7 +1198,7 @@ static int evalExpr(ej_t *ep, char_t *lhs, int rel, char_t *rhs)
if (numeric) {
for (cp = rhs; *cp; cp++) {
- if (!gisdigit((int)*cp)) {
+ if (!gisdigit((unsigned char)*cp)) {
numeric = 0;
break;
}
diff --git a/cpukit/httpd/emfdb.c b/cpukit/httpd/emfdb.c
index 242aa929bb..e3a8072d0f 100644
--- a/cpukit/httpd/emfdb.c
+++ b/cpukit/httpd/emfdb.c
@@ -980,7 +980,7 @@ char_t *dbGetTableName(int did, int tid)
static char_t *trim(char_t *str)
{
- while (isspace((int)*str)) {
+ while (isspace((unsigned char)*str)) {
str++;
}
return str;
diff --git a/cpukit/httpd/misc.c b/cpukit/httpd/misc.c
index 7d8c6d71c9..f9f4aac144 100644
--- a/cpukit/httpd/misc.c
+++ b/cpukit/httpd/misc.c
@@ -281,7 +281,7 @@ static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg, int msize)
}
c = *fmt++;
} else {
- for ( ; gisdigit((int)c); c = *fmt++) {
+ for ( ; gisdigit((unsigned char)c); c = *fmt++) {
width = width * 10 + (c - '0');
}
}
@@ -292,7 +292,7 @@ static int dsnprintf(char_t **s, int size, char_t *fmt, va_list arg, int msize)
prec = va_arg(arg, int);
c = *fmt++;
} else {
- for (prec = 0; gisdigit((int)c); c = *fmt++) {
+ for (prec = 0; gisdigit((unsigned char)c); c = *fmt++) {
prec = prec * 10 + (c - '0');
}
}
diff --git a/cpukit/httpd/um.c b/cpukit/httpd/um.c
index b2ea6671db..58e288affb 100644
--- a/cpukit/httpd/um.c
+++ b/cpukit/httpd/um.c
@@ -1419,7 +1419,7 @@ static bool_t umCheckName(char_t *name)
if (name && *name) {
while (*name) {
- if (gisspace((int)*name)) {
+ if (gisspace((unsigned char)*name)) {
return FALSE;
}
diff --git a/cpukit/httpd/webs.c b/cpukit/httpd/webs.c
index 8fe5a6aa65..509e7061d8 100644
--- a/cpukit/httpd/webs.c
+++ b/cpukit/httpd/webs.c
@@ -861,7 +861,7 @@ static void websParseRequest(webs_t wp)
value = T("");
}
- while (gisspace((int)*value)) {
+ while (gisspace((unsigned char)*value)) {
value++;
}
strlower(key);
@@ -897,7 +897,7 @@ static void websParseRequest(webs_t wp)
* Truncate authType at the next non-alpha character
*/
cp = authType;
- while (gisalpha((int)*cp)) {
+ while (gisalpha((unsigned char)*cp)) {
cp++;
}
*cp = '\0';
diff --git a/cpukit/httpd/websuemf.c b/cpukit/httpd/websuemf.c
index 267ada8c2f..2a2cb19ea4 100644
--- a/cpukit/httpd/websuemf.c
+++ b/cpukit/httpd/websuemf.c
@@ -84,7 +84,7 @@ int strcmpci(char_t *s1, char_t *s2)
}
do {
- rc = gtolower((int)*s1) - gtolower((int)*s2);
+ rc = gtolower((unsigned char)*s1) - gtolower((unsigned char)*s2);
if (*s1 == '\0') {
break;
}