diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-11-15 19:18:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-11-16 15:03:26 +0100 |
commit | 984794baf4af59da7f2496ecab33f2596d6619ff (patch) | |
tree | 97cecd77f21e7e48203656d81ad0657c879d716e /src/core | |
parent | afc402b76a4520997a7c831a943be75e3072b301 (diff) |
shared: split out code for adding multiple names to sd_bus_track object
Let's introduce a new call bus_track_add_name_many() that adds a string list to
a tracking object.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/dbus.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c index 070974fe66..ed4697c37e 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -1185,7 +1185,6 @@ void bus_track_serialize(sd_bus_track *t, FILE *f, const char *prefix) { } int bus_track_coldplug(Manager *m, sd_bus_track **t, bool recursive, char **l) { - char **i; int r = 0; assert(m); @@ -1207,16 +1206,7 @@ int bus_track_coldplug(Manager *m, sd_bus_track **t, bool recursive, char **l) { if (r < 0) return r; - r = 0; - STRV_FOREACH(i, l) { - int k; - - k = sd_bus_track_add_name(*t, *i); - if (k < 0) - r = k; - } - - return r; + return bus_track_add_name_many(*t, l); } int bus_verify_manage_units_async(Manager *m, sd_bus_message *call, sd_bus_error *error) { |