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/sysext | |
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/sysext')
-rw-r--r-- | src/sysext/sysext.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index 60789e0f2c..6d4df0afd2 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -124,7 +124,6 @@ static int unmerge_hierarchy(const char *p) { static int unmerge(void) { int r, ret = 0; - char **p; STRV_FOREACH(p, arg_hierarchies) { _cleanup_free_ char *resolved = NULL; @@ -161,7 +160,6 @@ static int verb_unmerge(int argc, char **argv, void *userdata) { static int verb_status(int argc, char **argv, void *userdata) { _cleanup_(table_unrefp) Table *t = NULL; int r, ret = 0; - char **p; t = table_new("hierarchy", "extensions", "since"); if (!t) @@ -245,7 +243,6 @@ static int mount_overlayfs( _cleanup_free_ char *options = NULL; bool separator = false; - char **l; int r; assert(where); @@ -285,7 +282,6 @@ static int merge_hierarchy( _cleanup_free_ char *resolved_hierarchy = NULL, *f = NULL, *buf = NULL; _cleanup_strv_free_ char **layers = NULL; struct stat st; - char **p; int r; assert(hierarchy); @@ -453,7 +449,6 @@ static int merge_subprocess(Hashmap *images, const char *workspace) { size_t n_extensions = 0; unsigned n_ignored = 0; Image *img; - char **h; int r; /* Mark the whole of /run as MS_SLAVE, so that we can mount stuff below it that doesn't show up on @@ -764,7 +759,6 @@ static int image_discover_and_read_metadata(Hashmap **ret_images) { static int verb_merge(int argc, char **argv, void *userdata) { _cleanup_(hashmap_freep) Hashmap *images = NULL; - char **p; int r; if (!have_effective_cap(CAP_SYS_ADMIN)) |