summaryrefslogtreecommitdiff
path: root/usr.bin/error
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@NetBSD.org>1999-05-15 18:46:27 +0000
committersommerfeld <sommerfeld@NetBSD.org>1999-05-15 18:46:27 +0000
commitfcfb8607331ec1a71b0c5e988b7ef6bcea1901ec (patch)
tree7d536c8fab9e145ff819e5c2be993cdbcce39c1b /usr.bin/error
parentb62918959e827a2fa26b6764b81c4fab603b4b69 (diff)
Don't assume isspace(0) == 1
Diffstat (limited to 'usr.bin/error')
-rw-r--r--usr.bin/error/subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/error/subr.c b/usr.bin/error/subr.c
index f046a13f2d5..1663388ac44 100644
--- a/usr.bin/error/subr.c
+++ b/usr.bin/error/subr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: subr.c,v 1.6 1998/11/06 23:10:08 christos Exp $ */
+/* $NetBSD: subr.c,v 1.7 1999/05/15 18:46:27 sommerfeld Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: subr.c,v 1.6 1998/11/06 23:10:08 christos Exp $");
+__RCSID("$NetBSD: subr.c,v 1.7 1999/05/15 18:46:27 sommerfeld Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -347,7 +347,7 @@ wordvbuild(string, r_wordc, r_wordv)
cp++;
if (*cp == 0)
break;
- while (!isspace((unsigned char)*cp))
+ while (*cp && !isspace((unsigned char)*cp))
cp++;
}
wordv = (char **)Calloc(wordcount + 1, sizeof (char *));
@@ -357,7 +357,7 @@ wordvbuild(string, r_wordc, r_wordv)
if (*cp == 0)
break;
wordv[wordindex] = cp;
- while(!isspace((unsigned char)*cp))
+ while(*cp && !isspace((unsigned char)*cp))
cp++;
*cp++ = '\0';
}