From fe6eb34a10ccfc2ececbcc7459d0a1fb23b9b021 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 8 Dec 2004 00:42:50 +0000 Subject: Solaris CC freaks out if isspace and friends get anything other than an int. We learned that, so we casted. But it is also a bad idea to cast a signed char to an int and expect things to work on win32. Now we cast to unsigned char, then to int, then pass to isspace. Ug svn:r3120 --- src/common/container.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/container.c') diff --git a/src/common/container.c b/src/common/container.c index 69d3d2731..0055fcb47 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -262,7 +262,7 @@ int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, cp = str; while (1) { if (flags&SPLIT_SKIP_SPACE) { - while (isspace((int)*cp)) ++cp; + while (TOR_ISSPACE(*cp)) ++cp; } if (max>0 && n == max-1) { @@ -279,7 +279,7 @@ int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, } if (flags&SPLIT_SKIP_SPACE) { - while (end > cp && isspace((int)*(end-1))) + while (end > cp && TOR_ISSPACE(*(end-1))) --end; } if (end != cp || !(flags&SPLIT_IGNORE_BLANK)) { -- cgit v1.2.3