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 f45ccb7bcd..36ab508ca6 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3388,7 +3388,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; \ |