aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-07-15 08:27:04 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-07-15 08:27:04 +0000
commit80209ec51c1c30606a7f572c4ecfa1331b1de6c4 (patch)
treefc8c1c016b1aed884afda92770049531ad6ecdc5 /usr.bin
parent3e019deaed5ad0687ea53ed5b5ba3336dc0be3c4 (diff)
downloadsrc-80209ec51c1c30606a7f572c4ecfa1331b1de6c4.tar.gz
src-80209ec51c1c30606a7f572c4ecfa1331b1de6c4.zip
Avoid passing negative values to isspace() on systems with signed chars.
Notes
Notes: svn path=/head/; revision=132200
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fmt/fmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c
index a8662fdcf3e3..8a763b5a1d1c 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);