aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit321a889afa872c3ec5df84a90ea936aa7daed34a (patch)
tree0a3849d3e3d655ab571088c5971eeb5ca02698da
parenta5e19dfb50e6dc63795c2d2cad6c0b6be10c2826 (diff)
downloadmandoc-321a889afa872c3ec5df84a90ea936aa7daed34a.tar.gz
mandoc-321a889afa872c3ec5df84a90ea936aa7daed34a.tar.zst
mandoc-321a889afa872c3ec5df84a90ea936aa7daed34a.zip
isspace(3) requires an unsigned argument;
bug reported by Thomas Klausner <wiz at NetBSD>
-rw-r--r--soelim.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/soelim.c b/soelim.c
index 3ef30820..33d60e45 100644
--- a/soelim.c
+++ b/soelim.c
@@ -1,4 +1,4 @@
-/* $Id: soelim.c,v 1.5 2015/11/07 14:22:29 schwarze Exp $ */
+/* $Id: soelim.c,v 1.6 2021/09/19 18:14:24 schwarze Exp $ */
/*
* Copyright (c) 2014 Baptiste Daroussin <bapt@FreeBSD.org>
* All rights reserved.
@@ -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)