We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9be148b commit a58b4e9Copy full SHA for a58b4e9
src/ds/ds_htable.c
@@ -129,7 +129,7 @@ static inline void ds_htable_auto_truncate(ds_htable_t *table)
129
{
130
const uint32_t capacity = table->capacity;
131
132
- if (table->size <= capacity / 4 && capacity > DS_HTABLE_MIN_CAPACITY) {
+ if (table->size < (capacity / 4) && (capacity / 2) >= DS_HTABLE_MIN_CAPACITY) {
133
ds_htable_pack(table);
134
ds_htable_realloc(table, capacity / 2);
135
ds_htable_rehash(table);
0 commit comments