Skip to content

Commit

Permalink
fixes nanomsg#475 Hash table does not decrease size
Browse files Browse the repository at this point in the history
nn_hash.items will increase by nn_hash_insert but won't decrease
  • Loading branch information
yan97ao authored and gdamore committed Oct 21, 2015
1 parent c98cb0f commit 968e90b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 968e90b

Please sign in to comment.