diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-15 08:27:04 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-15 08:27:04 +0000 |
commit | 21f820d4c3f86bcdc7f8e4e2ad1f117408869e27 (patch) | |
tree | fc8c1c016b1aed884afda92770049531ad6ecdc5 | |
parent | 5c95d686a13bd79feeadb1a577394bf79788b6a0 (diff) | |
download | FreeBSD-src-21f820d4c3f86bcdc7f8e4e2ad1f117408869e27.zip FreeBSD-src-21f820d4c3f86bcdc7f8e4e2ad1f117408869e27.tar.gz |
Avoid passing negative values to isspace() on systems with signed chars.
-rw-r--r-- | usr.bin/fmt/fmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index a8662fd..8a763b5 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -580,7 +580,7 @@ center_stream(FILE *stream, const char *name) { size_t length; while ((line=get_line(stream, &length)) != 0) { size_t l=length; - while (l>0 && isspace(*line)) { ++line; --l; } + while (l>0 && isspace((unsigned char)*line)) { ++line; --l; } length=l; while (l<goal_length) { putchar(' '); l+=2; } fwrite(line, 1, length, stdout); |