X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flibsystemd%2Fsd-bus%2Fbus-match.c;h=5658c61ba789fba1529c99112bb4be8159f90b69;hb=9cbfc66c621c42aa6e58e9e0da0adfb01efa7537;hp=88b61a75be5845227b24f01a7df51796e5258949;hpb=caa829849d6ac9f6e173f585f732054358311ae1;p=elogind.git diff --git a/src/libsystemd/sd-bus/bus-match.c b/src/libsystemd/sd-bus/bus-match.c index 88b61a75b..5658c61ba 100644 --- a/src/libsystemd/sd-bus/bus-match.c +++ b/src/libsystemd/sd-bus/bus-match.c @@ -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; @@ -537,7 +537,7 @@ static int bus_match_find_compare_value( else if (BUS_MATCH_CAN_HASH(t)) n = hashmap_get(c->compare.children, value_str); else { - for (n = c->child; !value_node_same(n, t, value_u8, value_str); n = n->next) + for (n = c->child; n && !value_node_same(n, t, value_u8, value_str); n = n->next) ; }