summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-09-19 18:14:24 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-09-19 18:14:24 +0000
commitcd02ff702eb906795b08c9e07e73017203eb92e3 (patch)
tree244ac304fae53c9d38bd5fc91d7cd8d2841f10cd
parente0e262ba899c1771d2c72c3dc9e5c913089f55f0 (diff)
downloadmandoc-cd02ff702eb906795b08c9e07e73017203eb92e3.tar.gz
isspace(3) requires an unsigned argument;
bug reported by Thomas Klausner <wiz at NetBSD>
-rw-r--r--soelim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/soelim.c b/soelim.c
index ba5e3678..77f69f9f 100644
--- a/soelim.c
+++ b/soelim.c
@@ -104,16 +104,16 @@ soelim_file(FILE *f, int flag)
}
walk = line + 3;
- if (!isspace(*walk) && ((flag & C_OPTION) == 0)) {
+ if (!isspace((unsigned char)*walk) && (flag & C_OPTION) == 0) {
printf("%s", line);
continue;
}
- while (isspace(*walk))
+ while (isspace((unsigned char)*walk))
walk++;
cp = walk;
- while (*cp != '\0' && !isspace(*cp))
+ while (*cp != '\0' && !isspace((unsigned char)*cp))
cp++;
*cp = 0;
if (cp < line + linelen)