diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-19 20:50:12 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-19 20:50:12 +0000 |
commit | c195f690583bd5f6bd7c0c760ee15fed944bbd7c (patch) | |
tree | dda31dd126abc4e888fbd6b20e5d9f4d0ac1cf16 /src/common/util.c | |
parent | 51750ae09a162bd9de70e9163213d3a07788ea9d (diff) | |
download | tor-c195f690583bd5f6bd7c0c760ee15fed944bbd7c.tar tor-c195f690583bd5f6bd7c0c760ee15fed944bbd7c.tar.gz |
isspace and friends take an int. solaris cares.
svn:r1303
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/util.c b/src/common/util.c index f3ffe676e..77e7916d8 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -163,8 +163,8 @@ void *smartlist_choose(smartlist_t *sl) { const char *eat_whitespace(const char *s) { assert(s); - while(isspace(*s) || *s == '#') { - while(isspace(*s)) + while(isspace((int)*s) || *s == '#') { + while(isspace((int)*s)) s++; if(*s == '#') { /* read to a \n or \0 */ while(*s && *s != '\n') @@ -186,7 +186,7 @@ const char *eat_whitespace_no_nl(const char *s) { const char *find_whitespace(const char *s) { assert(s); - while(*s && !isspace(*s) && *s != '#') + while(*s && !isspace((int)*s) && *s != '#') s++; return s; @@ -672,18 +672,18 @@ try_next_line: do { *s = 0; s--; - } while (s >= line && isspace(*s)); + } while (s >= line && isspace((int)*s)); key = line; - while(isspace(*key)) + while(isspace((int)*key)) key++; if(*key == 0) goto try_next_line; /* this line has nothing on it */ end = key; - while(*end && !isspace(*end)) + while(*end && !isspace((int)*end)) end++; value = end; - while(*value && isspace(*value)) + while(*value && isspace((int)*value)) value++; if(!*end || !*value) { /* only a key on this line. no value. */ |