aboutsummaryrefslogtreecommitdiff
path: root/src/ext/ht.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/ht.h')
-rw-r--r--src/ext/ht.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ext/ht.h b/src/ext/ht.h
index 54e5eb7cba..9d4add1936 100644
--- a/src/ext/ht.h
+++ b/src/ext/ht.h
@@ -226,7 +226,8 @@ ht_string_hash(const char *s)
(x) = HT_NEXT(name, head, x))
#ifndef HT_NDEBUG
-#define HT_ASSERT_(x) tor_assert(x)
+#include "lib/err/torerr.h"
+#define HT_ASSERT_(x) raw_assert(x)
#else
#define HT_ASSERT_(x) (void)0
#endif
@@ -370,7 +371,8 @@ ht_string_hash(const char *s)
/* Return the next element in 'head' after 'elm', under the arbitrary \
* order used by HT_START. If there are no more elements, return \
* NULL. If 'elm' is to be removed from the table, you must call \
- * this function for the next value before you remove it. \
+ * this function for the next value before you remove it, or use \
+ * HT_NEXT_RMV instead. \
*/ \
ATTR_UNUSED static inline struct type ** \
name##_HT_NEXT(struct name *head, struct type **elm) \
@@ -392,6 +394,8 @@ ht_string_hash(const char *s)
return NULL; \
} \
} \
+ /* As HT_NEXT, but also remove the current element 'elm' from the \
+ * table. */ \
ATTR_UNUSED static inline struct type ** \
name##_HT_NEXT_RMV(struct name *head, struct type **elm) \
{ \
@@ -617,4 +621,3 @@ ht_string_hash(const char *s)
*/
#endif
-