From ee872ac323ccc54c90007ee317393a2e4163c97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 8 Jan 2005 23:16:44 +0000 Subject: [PATCH] cast argument to is* to unsigned char git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14502 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftp/domacro.c | 6 +++--- appl/telnet/telnet/commands.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/appl/ftp/ftp/domacro.c b/appl/ftp/ftp/domacro.c index 51651208e..ba518c3a4 100644 --- a/appl/ftp/ftp/domacro.c +++ b/appl/ftp/ftp/domacro.c @@ -60,7 +60,7 @@ domacro(int argc, char **argv) TOP: cp1 = macros[i].mac_start; while (cp1 != macros[i].mac_end) { - while (isspace(*cp1)) { + while (isspace((unsigned char)*cp1)) { cp1++; } cp2 = line; @@ -70,9 +70,9 @@ TOP: *cp2++ = *++cp1; break; case '$': - if (isdigit(*(cp1+1))) { + if (isdigit((unsigned char)*(cp1+1))) { j = 0; - while (isdigit(*++cp1)) { + while (isdigit((unsigned char)*++cp1)) { j = 10*j + *cp1 - '0'; } cp1--; diff --git a/appl/telnet/telnet/commands.c b/appl/telnet/telnet/commands.c index c0fd513f6..ca1138d7d 100644 --- a/appl/telnet/telnet/commands.c +++ b/appl/telnet/telnet/commands.c @@ -74,7 +74,7 @@ makeargv() } while ((c = *cp)) { int inquote = 0; - while (isspace(c)) + while (isspace((unsigned char)c)) c = *++cp; if (c == '\0') break; @@ -96,7 +96,7 @@ makeargv() } else if (c == '\'') { inquote = '\''; continue; - } else if (isspace(c)) + } else if (isspace((unsigned char)c)) break; } *cp2++ = c; @@ -2026,11 +2026,11 @@ cmdrc(char *m1, char *m2) if (line[0] == '#') continue; if (gotmachine) { - if (!isspace(line[0])) + if (!isspace((unsigned char)line[0])) gotmachine = 0; } if (gotmachine == 0) { - if (isspace(line[0])) + if (isspace((unsigned char)line[0])) continue; if (strncasecmp(line, m1, l1) == 0) strncpy(line, &line[l1], sizeof(line) - l1);