Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fill hashes to 50%, not 100%.
John Hood committed 3 years ago
commit 6dacb31bf1317764dcadf371dae4a4e5b9ff3d91
parent a2f8654
1 file changed +1 -1
modified libpkg/pkghash.c
@@ -141,7 +141,7 @@ pkghash_expand(pkghash *table)
bool
pkghash_add(pkghash *table, const char *key, void *value, void (*free_func)(void *))
{
-
	if (table->count >= table->capacity -1 && !pkghash_expand(table))
+
	if (table->count * 2  >= table->capacity && !pkghash_expand(table))
		return (NULL);

	return (pkghash_set_entry(table->entries, table->capacity, key, value,