basic/hashmap: add comment

Coverity complains that the check is suspicious. Add a comment to help
the reader.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-12-19 11:19:18 +01:00
parent a0e475ce6a
commit e8d2cb0f34

View File

@@ -774,7 +774,7 @@ static struct HashmapBase* hashmap_base_new(const struct hash_ops *hash_ops, enu
HashmapBase *h;
const struct hashmap_type_info *hi = &hashmap_type_info[type];
bool use_pool = mempool_enabled && mempool_enabled();
bool use_pool = mempool_enabled && mempool_enabled(); /* mempool_enabled is a weak symbol */
h = use_pool ? mempool_alloc0_tile(hi->mempool) : malloc0(hi->head_size);
if (!h)