Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
libpkg: Fix a return value type in pkghash_add()
Mark Johnston committed 3 years ago
commit b0838aab1c243ee8391d42ec6dc08de604205f56
parent c40314f
1 file changed +2 -2
modified libpkg/pkghash.c
@@ -141,8 +141,8 @@ pkghash_expand(pkghash *table)
bool
pkghash_add(pkghash *table, const char *key, void *value, void (*free_func)(void *))
{
-
	if (table->count * 2  >= table->capacity && !pkghash_expand(table))
-
		return (NULL);
+
	if (table->count * 2 >= table->capacity && !pkghash_expand(table))
+
		return (false);

	return (pkghash_set_entry(table->entries, table->capacity, key, value,
	    &table->count, free_func));