diff options
author | Thomas Klausner <tk@giga.or.at> | 2021-12-07 08:59:16 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2021-12-07 10:36:18 -0800 |
commit | d09f1c6fafe75cac58409d026d7e6d43112f0d97 (patch) | |
tree | 6f9f6f25c5178fefb5ac02a1f6d90f61ff2541f4 | |
parent | d1214f20d5a946a461624b894678b155ed02d906 (diff) |
Use correct argument type for ctype(3) functions.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | scope.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -199,7 +199,7 @@ CMDStringToInt(char *s, int *v) else if (*s == '0') { sscanf(s, "%o", v); } - else if (isdigit(*s)) { + else if (isdigit(*(unsigned char *)s)) { sscanf(s, "%d", v); } else if (*s == '\'') { @@ -251,7 +251,7 @@ CMDSplitIntoWords(char *line, char **argv) argc = 0; while (*line) { - while (isspace(*line)) + while (isspace(*(unsigned char *)line)) line++; if (!*line) break; @@ -267,7 +267,7 @@ CMDSplitIntoWords(char *line, char **argv) else { *argv++ = line; argc++; - while (*line && !isspace(*line)) + while (*line && !isspace(*(unsigned char *)line)) line++; if (*line) *line++ = '\0'; @@ -1395,7 +1395,7 @@ DataFromRawFile(FD rawfd) in = FDinfo[rawfd].buffer; /* lines starting with space indicate change of sender */ - if (isspace(*in)) { + if (isspace(*(unsigned char *)in)) { /* If we already have data in buffer, process it */ if ((fd != -1) && (FDinfo[fd].bufcount > 0)) { debug(16, (stderr, "reporting %d bytes from: %s %s\n", @@ -1413,7 +1413,7 @@ DataFromRawFile(FD rawfd) } else { /* Need to parse header to figure out which direction */ - while (isspace(*in)) { + while (isspace(*(unsigned char *)in)) { in++; } if (strncmp(in, "Client Connect (fd ", 19) == 0) { @@ -1448,7 +1448,7 @@ DataFromRawFile(FD rawfd) int clientid; in = n + 8; - if (isdigit(*in)) + if (isdigit(*(unsigned char *)in)) clientid = strtol(in, NULL, 10); else clientid = 1; @@ -1500,7 +1500,7 @@ DataFromRawFile(FD rawfd) n = strchr(in, ':'); if (n != NULL) in = n + 1; - while (isspace(*in)) + while (isspace(*(unsigned char *)in)) in++; } } |