summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index 8183082..d9556ed 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -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;
}