Use raw_assert in ht.h

Also, include torerr.h from ht.h if we are using raw_assert.

Otherwise, our includes need to be ordered so that ht.h comes after
util_log.h.
This commit is contained in:
Nick Mathewson 2019-12-16 12:57:27 -05:00
parent 73b83b8f1a
commit 7b0d8834f2

View file

@ -226,7 +226,8 @@ ht_string_hash(const char *s)
(x) = HT_NEXT(name, head, x)) (x) = HT_NEXT(name, head, x))
#ifndef HT_NDEBUG #ifndef HT_NDEBUG
#define HT_ASSERT_(x) tor_assert(x) #include "lib/err/torerr.h"
#define HT_ASSERT_(x) raw_assert(x)
#else #else
#define HT_ASSERT_(x) (void)0 #define HT_ASSERT_(x) (void)0
#endif #endif