diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-10 21:46:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-10 21:46:33 +0000 |
commit | fa1376014b2d6c0daffa0e8801aec6f572ac29fa (patch) | |
tree | 2140c8c2f5beb324a5d74633875d83e22a8ae709 /src/or/routerparse.c | |
parent | 7e20fdbefb5f1ecad8fcb4b4876c937dc55d1615 (diff) | |
download | tor-fa1376014b2d6c0daffa0e8801aec6f572ac29fa.tar.gz tor-fa1376014b2d6c0daffa0e8801aec6f572ac29fa.zip |
r13689@catbus: nickm | 2007-07-10 17:46:30 -0400
tweaks to last patch. from croup.
svn:r10787
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 30957e70ab..de1c39c06d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2365,7 +2365,7 @@ get_next_token(const char **s, const char *eos, token_rule_t *table) tok->tp = _ERR; *s = eat_whitespace_eos(*s, eos); - if (!**s) { + if (*s == eos) { tok->tp = _EOF; return tok; } @@ -2377,10 +2377,8 @@ get_next_token(const char **s, const char *eos, token_rule_t *table) if (!strncmp("opt", *s, next-*s)) { /* Skip past an "opt" at the start of the line. */ *s = eat_whitespace_eos(next, eos); - next = NULL; - if (**s) - next = find_whitespace_eos(*s, eos); - if (!**s || !next) { + next = find_whitespace_eos(*s, eos); + if (!next) { RET_ERR("opt without keyword"); } } |