summaryrefslogtreecommitdiff
path: root/src/test/test-nss-users.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-16 22:32:23 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-19 08:33:33 +0900
commitde010b0b2e50cf0b3837ce350b116bc92605f67a (patch)
tree226685fbb97461692562035501ebc21a314f718c /src/test/test-nss-users.c
parent80a226b26b5e00a2ef9e85d1321da44cd14d051b (diff)
downloadsystemd-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/test/test-nss-users.c')
-rw-r--r--src/test/test-nss-users.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/test/test-nss-users.c b/src/test/test-nss-users.c
index 88e2764e99..5178779d54 100644
--- a/src/test/test-nss-users.c
+++ b/src/test/test-nss-users.c
@@ -170,7 +170,6 @@ static int test_one_module(const char *dir,
if (!handle)
return -EINVAL;
- char **name;
STRV_FOREACH(name, names)
test_byname(handle, module, *name);
@@ -235,7 +234,6 @@ static int parse_argv(int argc, char **argv,
static int run(int argc, char **argv) {
_cleanup_free_ char *dir = NULL;
_cleanup_strv_free_ char **modules = NULL, **names = NULL;
- char **module;
int r;
test_setup_logging(LOG_INFO);