diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-16 14:32:23 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-19 00:33:33 +0100 |
commit | de010b0b2e50cf0b3837ce350b116bc92605f67a (patch) | |
tree | 226685fbb97461692562035501ebc21a314f718c /src/shared/bus-unit-util.c | |
parent | list: make LIST_FOREACH() and LIST_FOREACH_BACKWARDS() safer (diff) | |
download | systemd-de010b0b2e50cf0b3837ce350b116bc92605f67a.tar.xz systemd-de010b0b2e50cf0b3837ce350b116bc92605f67a.zip |
strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
Diffstat (limited to 'src/shared/bus-unit-util.c')
-rw-r--r-- | src/shared/bus-unit-util.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index c35dd286e6..95ef3230b4 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1675,7 +1675,6 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con if (streq(field, "RootImageOptions")) { _cleanup_strv_free_ char **l = NULL; - char **first = NULL, **second = NULL; const char *p = eq; r = sd_bus_message_open_container(m, SD_BUS_TYPE_STRUCT, "sv"); @@ -2024,7 +2023,6 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con if (r < 0) return bus_log_create_error(r); - char **source, **destination; STRV_FOREACH_PAIR(source, destination, symlinks) { r = sd_bus_message_append(m, "(sst)", *source, *destination, 0); if (r < 0) @@ -2648,7 +2646,6 @@ int bus_append_unit_property_assignment(sd_bus_message *m, UnitType t, const cha } int bus_append_unit_property_assignment_many(sd_bus_message *m, UnitType t, char **l) { - char **i; int r; assert(m); |