]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/hashmap: add comment 25783/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 19 Dec 2022 10:19:18 +0000 (11:19 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 19 Dec 2022 14:16:41 +0000 (15:16 +0100)
Coverity complains that the check is suspicious. Add a comment to help
the reader.

src/basic/hashmap.c

index de7d16c3970ad99cf55537a3b5df5445bf16f689..cdf7db612c8454166d4c216168f40077ae8275ea 100644 (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)