diff options
author | ache <ache@FreeBSD.org> | 1997-10-23 02:03:43 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-10-23 02:03:43 +0000 |
commit | 436deeda1a243078fb9907dfb57558f6d481936d (patch) | |
tree | 5cb2a43d1de737532a8761c9b05aef6b70be3ab3 /contrib/awk/builtin.c | |
parent | 94286bf50951c81435f65927e7b8ef8554ab5877 (diff) | |
download | FreeBSD-src-436deeda1a243078fb9907dfb57558f6d481936d.zip FreeBSD-src-436deeda1a243078fb9907dfb57558f6d481936d.tar.gz |
Add more (unsigned char) casts to ctype macros
Fix casetable usage in the same manner too
Diffstat (limited to 'contrib/awk/builtin.c')
-rw-r--r-- | contrib/awk/builtin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/awk/builtin.c b/contrib/awk/builtin.c index dc2c1d3..32bde1c 100644 --- a/contrib/awk/builtin.c +++ b/contrib/awk/builtin.c @@ -231,7 +231,7 @@ NODE *tree; while (l1 > 0) { if (l2 > l1) break; - if (casetable[(int)*p1] == casetable[(int)*p2] + if (casetable[(unsigned char)*p1] == casetable[(unsigned char)*p2] && (l2 == 1 || strncasecmp(p1, p2, l2) == 0)) { ret = 1 + s1->stlen - l1; break; @@ -2038,7 +2038,7 @@ size_t len; } } else if (*str == '0') { for (; len > 0; len--) { - if (! isdigit(*str) || *str == '8' || *str == '9') + if (! isdigit((unsigned char)*str) || *str == '8' || *str == '9') goto done; retval = (retval * 8) + (*str - '0'); str++; |