diff options
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index 7d354c8fe1..f693ad908c 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3203,7 +3203,9 @@ typedef enum buildtimeout_set_event_t { */ #define CONN_LOG_PROTECT(conn, stmt) \ STMT_BEGIN \ - int _log_conn_is_control = (conn && conn->type == CONN_TYPE_CONTROL); \ + int _log_conn_is_control; \ + tor_assert(conn); \ + _log_conn_is_control = (conn->type == CONN_TYPE_CONTROL); \ if (_log_conn_is_control) \ disable_control_logging(); \ STMT_BEGIN stmt; STMT_END; \ |