X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbus-driverd%2Fbus-driverd.c;h=f8a123d4f118d290ae73005648c435f503d5ac35;hb=215c7625dd510759290d45d6c46434e4338843ec;hp=8888a07082996bc80abda7b27b0d0609f18f7c18;hpb=9f6445e34a57c270f013c9416c123e56261553dd;p=elogind.git diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 8888a0708..f8a123d4f 100644 --- a/src/bus-driverd/bus-driverd.c +++ b/src/bus-driverd/bus-driverd.c @@ -90,10 +90,10 @@ static void match_free(Match *m) { Match *first; first = hashmap_get(m->client->matches, m->match); - LIST_REMOVE(matches, first, m); - if (first) + if (first) { + LIST_REMOVE(matches, first, m); assert_se(hashmap_replace(m->client->matches, m->match, first) >= 0); - else + } else hashmap_remove(m->client->matches, m->match); m->client->n_matches--; @@ -346,7 +346,7 @@ static int driver_remove_match(sd_bus *bus, sd_bus_message *message, void *userd m = hashmap_get(c->matches, normalized); if (!m) { - r = sd_bus_error_setf(error, SD_BUS_ERROR_MATCH_RULE_NOT_FOUND, "Match rule \"%s\" not found."); + r = sd_bus_error_setf(error, SD_BUS_ERROR_MATCH_RULE_NOT_FOUND, "Match rule \"%s\" not found.", normalized); goto finish; } @@ -695,7 +695,7 @@ static int driver_start_service_by_name(sd_bus *bus, sd_bus_message *m, void *us return r; if (!t || !t[0] || t[1]) - return -EIO; + return sd_bus_error_setf(error, SD_BUS_ERROR_SERVICE_UNKNOWN, "Bus name %s not found.", name); r = sd_bus_call_method( bus,