diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-19 23:34:37 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-07-19 23:34:37 +0200 |
commit | 55ddbff77d1274c028a3be5876ca1b28e090c322 (patch) | |
tree | 0e52dab0e351ee20be31a1bcf4d5712b9e202f86 /sys/src/cmd/webfs/fs.c | |
parent | 15885866cb892152519882f7d661d1dba665d712 (diff) |
fix strchr \0 bugs
Diffstat (limited to 'sys/src/cmd/webfs/fs.c')
-rw-r--r-- | sys/src/cmd/webfs/fs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/webfs/fs.c b/sys/src/cmd/webfs/fs.c index 5e803d07d..b513ec114 100644 --- a/sys/src/cmd/webfs/fs.c +++ b/sys/src/cmd/webfs/fs.c @@ -613,7 +613,7 @@ clientctl(Client *cl, char *ctl, char *arg) else if(!strcmp(ctl, "headers")){ while(arg && *arg){ ctl = arg; - while(*ctl && strchr("\r\n\t ", *ctl)) + while(*ctl && strchr(whitespace, *ctl)) ctl++; if(arg = strchr(ctl, '\n')) *arg++ = 0; @@ -663,9 +663,9 @@ fswrite(Req *r) n--; s[n] = 0; t = s; - while(*t && strchr("\r\n\t ", *t)==0) + while(*t && strchr(whitespace, *t)==0) t++; - while(*t && strchr("\r\n\t ", *t)) + while(*t && strchr(whitespace, *t)) *t++ = 0; if(f->level == Qctl) t = clientctl(f->client, s, t); |