summaryrefslogtreecommitdiff
path: root/src/common/container.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-12-08 00:42:50 +0000
committerNick Mathewson <nickm@torproject.org>2004-12-08 00:42:50 +0000
commitfe6eb34a10ccfc2ececbcc7459d0a1fb23b9b021 (patch)
tree806b089836d892e3024af375d8c0e95a9ef8fe00 /src/common/container.c
parentd7dbfd3644dac410cb4ee558f31b514ca3689afc (diff)
downloadtor-fe6eb34a10ccfc2ececbcc7459d0a1fb23b9b021.tar.gz
tor-fe6eb34a10ccfc2ececbcc7459d0a1fb23b9b021.zip
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
Diffstat (limited to 'src/common/container.c')
-rw-r--r--src/common/container.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/container.c b/src/common/container.c
index 69d3d2731e..0055fcb476 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)) {