summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authoryan97ao <magictao@gmail.com>2015-08-15 00:13:34 +0800
committerGarrett D'Amore <garrett@damore.org>2015-10-21 11:03:22 -0700
commit968e90b685bcebd42bd05cf52c3f4e43cf83c8ba (patch)
tree292368d4e013ffb31da70b81df4b5c06e1f6d0de /src/utils
parentc98cb0f4313002d9ac25654197984a865a91d8ba (diff)
downloadnanomsg-968e90b685bcebd42bd05cf52c3f4e43cf83c8ba.tar.gz
fixes #475 Hash table does not decrease size
nn_hash.items will increase by nn_hash_insert but won't decrease
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/hash.c b/src/utils/hash.c
index d402148..8ffe3e2 100644
--- a/src/utils/hash.c
+++ b/src/utils/hash.c
@@ -117,6 +117,7 @@ void nn_hash_erase (struct nn_hash *self, struct nn_hash_item *item)
slot = nn_hash_key (item->key) % self->slots;
nn_list_erase (&self->array [slot], &item->list);
+ --self->items;
}
struct nn_hash_item *nn_hash_get (struct nn_hash *self, uint32_t key)