forked from Imagelibrary/rtems
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:
@@ -1568,18 +1568,18 @@ skip_options(char **p)
|
||||
char* buf = *p;
|
||||
char* last = NULL;
|
||||
while(1) {
|
||||
while(isspace((int)*buf))
|
||||
while(isspace((unsigned char)*buf))
|
||||
++buf;
|
||||
if(*buf == '-') {
|
||||
if(*++buf == '-') { /* `--' should terminate options */
|
||||
if(isspace((int)*++buf)) {
|
||||
if(isspace((unsigned char)*++buf)) {
|
||||
last = buf;
|
||||
do ++buf;
|
||||
while(isspace((int)*buf));
|
||||
while(isspace((unsigned char)*buf));
|
||||
break;
|
||||
}
|
||||
}
|
||||
while(*buf && !isspace((int)*buf))
|
||||
while(*buf && !isspace((unsigned char)*buf))
|
||||
++buf;
|
||||
last = buf;
|
||||
}
|
||||
@@ -1612,18 +1612,18 @@ split_command(char *buf, char **cmd, char **opts, char **args)
|
||||
{
|
||||
char* eoc;
|
||||
char* p = buf;
|
||||
while(isspace((int)*p))
|
||||
while(isspace((unsigned char)*p))
|
||||
++p;
|
||||
*cmd = p;
|
||||
while(*p && !isspace((int)*p))
|
||||
while(*p && !isspace((unsigned char)*p))
|
||||
{
|
||||
*p = toupper((int)*p);
|
||||
*p = toupper((unsigned char)*p);
|
||||
++p;
|
||||
}
|
||||
eoc = p;
|
||||
if(*p)
|
||||
*p++ = '\0';
|
||||
while(isspace((int)*p))
|
||||
while(isspace((unsigned char)*p))
|
||||
++p;
|
||||
*opts = p;
|
||||
skip_options(&p);
|
||||
|
||||
Reference in New Issue
Block a user