diff options
author | David Robillard <d@drobilla.net> | 2021-06-30 01:55:23 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-06-30 01:55:23 -0400 |
commit | 85903d04bd8a99b5a2c749c2c2bc103f87b35281 (patch) | |
tree | 05876ec7266b66159783f2891b5a57cf9b907abe /src/hash.c | |
parent | 10a26115c115fa1bd88b1f431f965b348c9b5cdc (diff) | |
download | zix-85903d04bd8a99b5a2c749c2c2bc103f87b35281.tar.gz zix-85903d04bd8a99b5a2c749c2c2bc103f87b35281.tar.bz2 zix-85903d04bd8a99b5a2c749c2c2bc103f87b35281.zip |
Fix hash size after removing elements
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -200,6 +200,7 @@ zix_hash_remove(ZixHash* hash, const void* value) if (h_nomod == e->hash && hash->equal_func(zix_hash_value(e), value)) { *next_ptr = e->next; free(e); + --hash->count; return ZIX_STATUS_SUCCESS; } next_ptr = &e->next; @@ -214,7 +215,6 @@ zix_hash_remove(ZixHash* hash, const void* value) } } - --hash->count; return ZIX_STATUS_NOT_FOUND; } |