diff options
author | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:14:52 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-10-16 22:14:52 +0000 |
commit | de65052312ff9ddd86e492985008bd5ca61d7aa9 (patch) | |
tree | 96a2b81c47b4e35e465aa01d8328517a1525d752 /src/or/connection_or.c | |
parent | 25a046df7422560b16dfdb302df9621309d5fa77 (diff) | |
download | tor-de65052312ff9ddd86e492985008bd5ca61d7aa9.tar.gz tor-de65052312ff9ddd86e492985008bd5ca61d7aa9.zip |
don't assert multiple things in the same tor_assert()
svn:r2544
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index ccbb3f54cb..7ad0230d4a 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -43,7 +43,8 @@ static void cell_unpack(cell_t *dest, const char *src) { */ int connection_or_process_inbuf(connection_t *conn) { - tor_assert(conn && conn->type == CONN_TYPE_OR); + tor_assert(conn); + tor_assert(conn->type == CONN_TYPE_OR); if(conn->inbuf_reached_eof) { log_fn(LOG_INFO,"OR connection reached EOF. Closing."); @@ -65,7 +66,8 @@ int connection_or_process_inbuf(connection_t *conn) { * return 0. */ int connection_or_finished_flushing(connection_t *conn) { - tor_assert(conn && conn->type == CONN_TYPE_OR); + tor_assert(conn); + tor_assert(conn->type == CONN_TYPE_OR); assert_connection_ok(conn,0); @@ -82,7 +84,8 @@ int connection_or_finished_flushing(connection_t *conn) { */ int connection_or_finished_connecting(connection_t *conn) { - tor_assert(conn && conn->type == CONN_TYPE_OR); + tor_assert(conn); + tor_assert(conn->type == CONN_TYPE_OR); tor_assert(conn->state == OR_CONN_STATE_CONNECTING); log_fn(LOG_INFO,"OR connect() to router %s:%u finished.", @@ -152,6 +155,7 @@ connection_or_update_nickname(connection_t *conn) routerinfo_t *r; const char *n; + tor_assert(conn); tor_assert(conn->type == CONN_TYPE_OR); n = dirserv_get_nickname_by_digest(conn->identity_digest); if (n) { @@ -414,7 +418,8 @@ void connection_or_write_cell_to_buf(const cell_t *cell, connection_t *conn) { char networkcell[CELL_NETWORK_SIZE]; char *n = networkcell; - tor_assert(cell && conn); + tor_assert(cell); + tor_assert(conn); tor_assert(connection_speaks_cells(conn)); cell_pack(n, cell); |