mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user