Make sure to use unsigned char for is*() functions
On some platforms, the implementation is such that a signed char
triggers a warning when used with is*() functions. On others, the
behavior is outright buggy when presented with a char that happens
to get promoted to a negative integer.
The safest thing is to cast the char that's used to an unsigned char.
Reviewed-by: Andy Polyakov <appro@openssl.org>
diff --git a/apps/apps.c b/apps/apps.c
index 7a4608f..2a189f2 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -183,7 +183,7 @@
for (p = buf;;) {
/* Skip whitespace. */
- while (*p && isspace(*p))
+ while (*p && isspace(_UC(*p)))
p++;
if (!*p)
break;
@@ -207,7 +207,7 @@
p++;
*p++ = '\0';
} else {
- while (*p && !isspace(*p))
+ while (*p && !isspace(_UC(*p)))
p++;
if (*p)
*p++ = '\0';