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/cgls | |
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/cgls')
-rw-r--r-- | src/cgls/cgls.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 936ea4d3af..6af95204e3 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -201,7 +201,6 @@ static int run(int argc, char *argv[]) { if (arg_names) { _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL; _cleanup_free_ char *root = NULL; - char **name; STRV_FOREACH(name, arg_names) { int q; |