summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-10-16 22:14:52 +0000
committerRoger Dingledine <arma@torproject.org>2004-10-16 22:14:52 +0000
commitde65052312ff9ddd86e492985008bd5ca61d7aa9 (patch)
tree96a2b81c47b4e35e465aa01d8328517a1525d752 /src/or/routerparse.c
parent25a046df7422560b16dfdb302df9621309d5fa77 (diff)
downloadtor-de65052312ff9ddd86e492985008bd5ca61d7aa9.tar.gz
tor-de65052312ff9ddd86e492985008bd5ca61d7aa9.zip
don't assert multiple things in the same tor_assert()
svn:r2544
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 6a759fdd1f..8700502a0a 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -388,8 +388,8 @@ router_parse_routerlist_from_directory(const char *str,
goto err;
}
if (tok->n_args > 1) {
- log_fn(LOG_WARN, "Invalid recommended-software line");goto err;
-
+ log_fn(LOG_WARN, "Invalid recommended-software line");
+ goto err;
}
versions = tok->n_args ? tor_strdup(tok->args[0]) : tor_strdup("");
@@ -681,7 +681,8 @@ router_parse_list_from_string(const char **s, routerlist_t **dest,
smartlist_t *routers;
const char *end;
- tor_assert(s && *s);
+ tor_assert(s);
+ tor_assert(*s);
routers = smartlist_create();
@@ -848,7 +849,7 @@ routerinfo_t *router_parse_entry_from_string(const char *s,
}
tor_assert(tok->n_args == 1);
if (parse_iso_time(tok->args[0], &router->published_on) < 0)
- goto err;
+ goto err;
if (!(tok = find_first_by_keyword(tokens, K_ONION_KEY))) {
log_fn(LOG_WARN, "Missing onion key"); goto err;
@@ -1421,7 +1422,8 @@ int tor_version_parse(const char *s, tor_version_t *out)
/* Format is:
* NUM dot NUM dot NUM [ ( pre | rc | dot ) NUM [ -cvs ] ]
*/
- tor_assert(s && out);
+ tor_assert(s);
+ tor_assert(out);
memset(out, 0, sizeof(tor_version_t));
/* Get major. */
@@ -1481,7 +1483,8 @@ int tor_version_parse(const char *s, tor_version_t *out)
int tor_version_compare(tor_version_t *a, tor_version_t *b)
{
int i;
- tor_assert(a && b);
+ tor_assert(a);
+ tor_assert(b);
if ((i = a->major - b->major))
return i;
else if ((i = a->minor - b->minor))