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.
This commit is contained in:
Joel Sherrill
2010-03-12 16:26:16 +00:00
parent 3c02c9dd47
commit bab5c5fac0
31 changed files with 111 additions and 92 deletions
+4 -4
View File
@@ -219,7 +219,7 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp)
p = argc == 1 ? (*argvp)[0] : (*argvp)[1];
if (*p != '+' && (argc < 2 ||
(!isdigit((int)p[0]) && (p[0] != 'x' || !isxdigit((int)p[1])))))
(!isdigit((unsigned char)p[0]) && (p[0] != 'x' || !isxdigit((unsigned char)p[1])))))
return;
base = 0;
@@ -229,7 +229,7 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp)
*/
if (p[0] == '+')
++p;
if (p[0] == 'x' && isxdigit((int)p[1])) {
if (p[0] == 'x' && isxdigit((unsigned char)p[1])) {
++p;
base = 16;
} else if (p[0] == '0' && p[1] == 'x') {
@@ -239,9 +239,9 @@ odoffset(rtems_shell_hexdump_globals* globals, int argc, char ***argvp)
/* skip over the number */
if (base == 16)
for (num = p; isxdigit((int)*p); ++p);
for (num = p; isxdigit((unsigned char)*p); ++p);
else
for (num = p; isdigit((int)*p); ++p);
for (num = p; isdigit((unsigned char)*p); ++p);
/* check for no number */
if (num == p)
+1 -1
View File
@@ -73,7 +73,7 @@ int rtems_shell_main_ifconfig(
cur_idx += 1;
} else {
iface = argv[1];
if (isdigit((int)*argv[2])) {
if (isdigit((unsigned char)*argv[2])) {
if (inet_pton(AF_INET, argv[2], &ipaddr.sin_addr) < 0) {
printf("bad ip address: %s\n", argv[2]);
return 0;
+1 -1
View File
@@ -765,7 +765,7 @@ bool rtems_shell_main_loop(
/* evaluate cmd section */
c = cmds[cmd];
while (*c) {
if (!isblank((int)*c))
if (!isblank((unsigned char)*c))
break;
c++;
}
+2 -2
View File
@@ -34,7 +34,7 @@ int rtems_shell_make_args(
while ( *ch ) {
while ( isspace((int)*ch) ) ch++;
while ( isspace((unsigned char)*ch) ) ch++;
if ( *ch == '\0' )
break;
@@ -44,7 +44,7 @@ int rtems_shell_make_args(
while ( ( *ch == '\0' ) && ( *ch != '"' ) ) ch++;
} else {
argv_p[ argc++ ] = ch;
while ( ( *ch == '\0' ) && ( !isspace((int)*ch) ) ) ch++;
while ( ( *ch == '\0' ) && ( !isspace((unsigned char)*ch) ) ) ch++;
}
if ( *ch == '\0' )