summaryrefslogtreecommitdiff
path: root/lib/trim.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-04-16 03:26:46 +0200
committerBruno Haible <bruno@clisp.org>2008-04-16 03:26:46 +0200
commitda7ca7f1991964ba2de6a6c49ba6239697f3a4cc (patch)
treed6142cd32ab95d43efaf55a2f4f60a968b706e53 /lib/trim.c
parenta5c02266250d51d94c137f4fca8bec8e7654ff8c (diff)
downloadgnulib-da7ca7f1991964ba2de6a6c49ba6239697f3a4cc.tar.gz
Fix use of isspace() function.
Diffstat (limited to 'lib/trim.c')
-rw-r--r--lib/trim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/trim.c b/lib/trim.c
index 6a71578bf6..3813ca88ab 100644
--- a/lib/trim.c
+++ b/lib/trim.c
@@ -113,7 +113,7 @@ trim2(const char *s, int how)
/* Trim leading whitespaces. */
if (how != TRIM_TRAILING) {
- for (p = d; *p && isspace (*p); p++)
+ for (p = d; *p && isspace ((unsigned char) *p); p++)
;
memmove (d, p, strlen (p) + 1);
@@ -121,7 +121,7 @@ trim2(const char *s, int how)
/* Trim trailing whitespaces. */
if (how != TRIM_LEADING) {
- for (p = d + strlen (d) - 1; p >= d && isspace (*p); p--)
+ for (p = d + strlen (d) - 1; p >= d && isspace ((unsigned char) *p); p--)
*p = '\0';
}
}