chiark / gitweb /
hashmap: introduce hash_ops to make struct Hashmap smaller
[elogind.git] / src / libsystemd / sd-bus / bus-match.c
index 88b61a75be5845227b24f01a7df51796e5258949..18afe0f12a0e96d585b8a29e81b3ff3a70cc01ec 100644 (file)
@@ -450,13 +450,13 @@ static int bus_match_add_compare_value(
                 where->child = c;
 
                 if (t == BUS_MATCH_MESSAGE_TYPE) {
-                        c->compare.children = hashmap_new(trivial_hash_func, trivial_compare_func);
+                        c->compare.children = hashmap_new(NULL);
                         if (!c->compare.children) {
                                 r = -ENOMEM;
                                 goto fail;
                         }
                 } else if (BUS_MATCH_CAN_HASH(t)) {
-                        c->compare.children = hashmap_new(string_hash_func, string_compare_func);
+                        c->compare.children = hashmap_new(&string_hash_ops);
                         if (!c->compare.children) {
                                 r = -ENOMEM;
                                 goto fail;