summaryrefslogtreecommitdiff
path: root/src/run
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-05 18:32:42 +0200
committerLennart Poettering <lennart@poettering.net>2016-08-18 22:23:31 +0200
commit8673cf13c08998b50818346b703ad91fe5facfdf (patch)
tree9bf2e2201a5c974ef473637fedca2512f74981db /src/run
parent622a0f628cee51851ad00856f9efddedf0799edb (diff)
bus-util: unify loop around bus_append_unit_property_assignment()
This is done exactly the same way a couple of times at various places, let's unify this into one version.
Diffstat (limited to 'src/run')
-rw-r--r--src/run/run.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/run/run.c b/src/run/run.c
index 1917ffd857..f4a90fce71 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -410,18 +410,15 @@ static int parse_argv(int argc, char *argv[]) {
}
static int transient_unit_set_properties(sd_bus_message *m, char **properties) {
- char **i;
int r;
r = sd_bus_message_append(m, "(sv)", "Description", "s", arg_description);
if (r < 0)
return r;
- STRV_FOREACH(i, properties) {
- r = bus_append_unit_property_assignment(m, *i);
- if (r < 0)
- return r;
- }
+ r = bus_append_unit_property_assignment_many(m, properties);
+ if (r < 0)
+ return r;
return 0;
}