From 67d5e1e4ca79d86c8beedc8709efb27f83295443 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 19 Jun 2004 01:44:56 +0000 Subject: Cast arguments of is*() ctype.h functions to unsigned char to be 8-bit safe. svn path=/trunk/; revision=3903 --- socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'socket.c') diff --git a/socket.c b/socket.c index 108f2e30..b8195e5f 100644 --- a/socket.c +++ b/socket.c @@ -90,7 +90,7 @@ static char *const *parse_plugin(const char *plugin, const char *host, const cha unsigned int service_len = strlen(service); for (c = p = plugin; *c; c++) - { if (isspace(*c) && !isspace(*p)) + { if (isspace((unsigned char)*c) && !isspace((unsigned char)*p)) s += sizeof(char*); if (*p == '%' && *c == 'h') host_count++; @@ -134,14 +134,14 @@ static char *const *parse_plugin(const char *plugin, const char *host, const cha } memset(argvec, 0, s); for (c = p = plugin_copy, i = 0; *c; c++) - { if ((!isspace(*c)) && (c == p ? 1 : isspace(*p))) { + { if ((!isspace((unsigned char)*c)) && (c == p ? 1 : isspace((unsigned char)*p))) { argvec[i] = c; i++; } p = c; } for (cp = plugin_copy; *cp; cp++) - { if (isspace(*cp)) + { if (isspace((unsigned char)*cp)) *cp = 0; } return (char *const*)argvec; -- cgit v1.2.3