diff options
author | joerg <joerg@FreeBSD.org> | 1996-03-19 21:21:06 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-03-19 21:21:06 +0000 |
commit | 46c1f410f7f10fa7480038ad8474a2792d9d03e0 (patch) | |
tree | d971d9c0d5946c92afa89a9f03c27bc5b6318aa9 /usr.bin/tr/str.c | |
parent | 11fb5722e2f671a26c53af2c2c4ddf4dbf12be4b (diff) | |
download | FreeBSD-src-46c1f410f7f10fa7480038ad8474a2792d9d03e0.zip FreeBSD-src-46c1f410f7f10fa7480038ad8474a2792d9d03e0.tar.gz |
Cast char's to (u_char) before passing them to isctype() functions.
Diffstat (limited to 'usr.bin/tr/str.c')
-rw-r--r-- | usr.bin/tr/str.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index 0c2b6ef..7c0fd7c 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -277,7 +277,7 @@ genseq(s) ++s->str; break; default: - if (isdigit(*s->str)) { + if (isdigit((u_char)*s->str)) { s->cnt = strtol(s->str, &ep, 0); if (*ep == ']') { s->str = ep + 1; @@ -302,7 +302,7 @@ backslash(s) register int ch, cnt, val; for (cnt = val = 0;;) { - ch = *++s->str; + ch = (u_char)*++s->str; if (!isascii(ch) || !isdigit(ch)) break; val = val * 8 + ch - '0'; |