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/xdg-autostart-generator | |
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/xdg-autostart-generator')
-rw-r--r-- | src/xdg-autostart-generator/xdg-autostart-condition.c | 1 | ||||
-rw-r--r-- | src/xdg-autostart-generator/xdg-autostart-generator.c | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/src/xdg-autostart-generator/xdg-autostart-condition.c b/src/xdg-autostart-generator/xdg-autostart-condition.c index c4485cf625..9ceea61547 100644 --- a/src/xdg-autostart-generator/xdg-autostart-condition.c +++ b/src/xdg-autostart-generator/xdg-autostart-condition.c @@ -13,7 +13,6 @@ static int run(int argc, char *argv[]) { _cleanup_strv_free_ char **only_show_in = NULL, **not_show_in = NULL, **desktops = NULL; const char *xdg_current_desktop; - char **d; if (argc != 3) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), diff --git a/src/xdg-autostart-generator/xdg-autostart-generator.c b/src/xdg-autostart-generator/xdg-autostart-generator.c index 8bc16831e7..91dda27d43 100644 --- a/src/xdg-autostart-generator/xdg-autostart-generator.c +++ b/src/xdg-autostart-generator/xdg-autostart-generator.c @@ -24,7 +24,6 @@ static int enumerate_xdg_autostart(Hashmap *all_services) { _cleanup_strv_free_ char **config_dirs = NULL; _unused_ _cleanup_strv_free_ char **data_dirs = NULL; _cleanup_free_ char *user_config_autostart_dir = NULL; - char **path; int r; r = xdg_user_config_dir(&user_config_autostart_dir, "/autostart"); |