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/libmisc | |
parent | 2010-03-12 Sebastian Huber <Sebastian.Huber@embedded-brains.de> (diff) | |
download | rtems-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/libmisc')
-rw-r--r-- | cpukit/libmisc/capture/capture-cli.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-network.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/shell/hexdump-odsyntax.c | 8 | ||||
-rw-r--r-- | cpukit/libmisc/shell/main_ifconfig.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/shell/shell.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/shell/shell_makeargs.c | 4 | ||||
-rw-r--r-- | cpukit/libmisc/uuid/parse.c | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c index 7f8e37c66e..98f76764f3 100644 --- a/cpukit/libmisc/capture/capture-cli.c +++ b/cpukit/libmisc/capture/capture-cli.c @@ -642,7 +642,7 @@ rtems_capture_cli_get_name_id (char* arg, l = strlen (arg); for (i = 0; i < l; i++) - if (!isxdigit ((int)arg[i])) + if (!isxdigit ((unsigned char)arg[i])) break; if (i == l) @@ -1324,7 +1324,7 @@ rtems_capture_cli_trace_records (int argc, l = strlen (argv[arg]); for (i = 0; i < l; i++) - if (!isdigit ((int)argv[arg][i])) + if (!isdigit ((unsigned char)argv[arg][i])) { fprintf (stdout, "error: not a number\n"); return; diff --git a/cpukit/libmisc/monitor/mon-network.c b/cpukit/libmisc/monitor/mon-network.c index f311b0de09..52c0cd9852 100644 --- a/cpukit/libmisc/monitor/mon-network.c +++ b/cpukit/libmisc/monitor/mon-network.c @@ -70,7 +70,7 @@ void mon_ifconfig(int argc, char *argv[], 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; diff --git a/cpukit/libmisc/shell/hexdump-odsyntax.c b/cpukit/libmisc/shell/hexdump-odsyntax.c index 3924a680af..c18c40b9e8 100644 --- a/cpukit/libmisc/shell/hexdump-odsyntax.c +++ b/cpukit/libmisc/shell/hexdump-odsyntax.c @@ -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) diff --git a/cpukit/libmisc/shell/main_ifconfig.c b/cpukit/libmisc/shell/main_ifconfig.c index b314dc9b9c..9f16207b10 100644 --- a/cpukit/libmisc/shell/main_ifconfig.c +++ b/cpukit/libmisc/shell/main_ifconfig.c @@ -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; diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c index 6e2096433a..bcc146731b 100644 --- a/cpukit/libmisc/shell/shell.c +++ b/cpukit/libmisc/shell/shell.c @@ -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++; } diff --git a/cpukit/libmisc/shell/shell_makeargs.c b/cpukit/libmisc/shell/shell_makeargs.c index 346a8706b5..248a8c6a89 100644 --- a/cpukit/libmisc/shell/shell_makeargs.c +++ b/cpukit/libmisc/shell/shell_makeargs.c @@ -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' ) diff --git a/cpukit/libmisc/uuid/parse.c b/cpukit/libmisc/uuid/parse.c index aa003dec32..d2f04f9f85 100644 --- a/cpukit/libmisc/uuid/parse.c +++ b/cpukit/libmisc/uuid/parse.c @@ -61,7 +61,7 @@ int uuid_parse(const char *in, uuid_t uu) if (i== 36) if (*cp == 0) continue; - if (!isxdigit((int)*cp)) + if (!isxdigit((unsigned char)*cp)) return -1; } uuid.time_low = strtoul(in, NULL, 16); |