strv: make iterator in STRV_FOREACH() declaread in the loop

This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
This commit is contained in:
Yu Watanabe
2022-03-19 08:33:33 +09:00
parent 80a226b26b
commit de010b0b2e
210 changed files with 109 additions and 621 deletions
-3
View File
@@ -247,8 +247,6 @@ static const char *join_with(const char *controller) {
NULL
};
const char *const *x, *const *y;
assert(controller);
/* This will lookup which controller to mount another controller with. Input is a controller name, and output
@@ -436,7 +434,6 @@ static int relabel_cgroup_filesystems(void) {
static int relabel_extra(void) {
_cleanup_strv_free_ char **files = NULL;
char **file;
int r, c = 0;
/* Support for relabelling additional files or directories after loading the policy. For this, code in the