diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-16 22:32:23 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-19 08:33:33 +0900 |
commit | de010b0b2e50cf0b3837ce350b116bc92605f67a (patch) | |
tree | 226685fbb97461692562035501ebc21a314f718c /src/systemctl/systemctl-logind.c | |
parent | 80a226b26b5e00a2ef9e85d1321da44cd14d051b (diff) | |
download | systemd-de010b0b2e50cf0b3837ce350b116bc92605f67a.tar.gz |
strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
Diffstat (limited to 'src/systemctl/systemctl-logind.c')
-rw-r--r-- | src/systemctl/systemctl-logind.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c index 897d936aba..40521b8595 100644 --- a/src/systemctl/systemctl-logind.c +++ b/src/systemctl/systemctl-logind.c @@ -112,7 +112,6 @@ int logind_check_inhibitors(enum action a) { uint32_t uid, pid; sd_bus *bus; unsigned c = 0; - char **s; int r; if (arg_check_inhibitors == 0 || arg_force > 0) @@ -399,7 +398,6 @@ int help_boot_loader_entry(void) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; _cleanup_strv_free_ char **l = NULL; sd_bus *bus; - char **i; int r; r = acquire_bus(BUS_FULL, &bus); |