aboutsummaryrefslogtreecommitdiff
path: root/src/ext/ht.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-11 10:15:40 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-11 10:15:40 -0400
commitd6b2af7a3aba24cf3d77587c41028aad70d59605 (patch)
treea6d8687d4055a9e27fbcb406cfb518295469bf0c /src/ext/ht.h
parentc274f825da18f33f12eb78260d1c78d5f685d959 (diff)
parente80a032b61e3c793ad0d1627074b8750f7cfec48 (diff)
downloadtor-d6b2af7a3aba24cf3d77587c41028aad70d59605.tar.gz
tor-d6b2af7a3aba24cf3d77587c41028aad70d59605.zip
Merge branch 'bug19180_easy_squashed'
Diffstat (limited to 'src/ext/ht.h')
-rw-r--r--src/ext/ht.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ext/ht.h b/src/ext/ht.h
index 28d1fe49d5..1b6cbe6632 100644
--- a/src/ext/ht.h
+++ b/src/ext/ht.h
@@ -203,6 +203,7 @@ ht_string_hash(const char *s)
name##_HT_GROW(head, head->hth_n_entries+1); \
HT_SET_HASH_(elm, field, hashfn); \
p = name##_HT_FIND_P_(head, elm); \
+ HT_ASSERT_(p != NULL); /* this holds because we called HT_GROW */ \
r = *p; \
*p = elm; \
if (r && (r!=elm)) { \
@@ -470,6 +471,7 @@ ht_string_hash(const char *s)
name##_HT_GROW(var##_head_, var##_head_->hth_n_entries+1); \
HT_SET_HASH_((elm), field, hashfn); \
var = name##_HT_FIND_P_(var##_head_, (elm)); \
+ HT_ASSERT_(var); /* Holds because we called HT_GROW */ \
if (*var) { \
y; \
} else { \