diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-22 12:12:54 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-22 12:12:54 +0200 |
commit | e3643b00a86f41f7c7eea188b392982195182601 (patch) | |
tree | 25ea22d997034c5834b26c63619ff8b1c40f50f3 | |
parent | 8f8c7801e92f084b72850ae79ca071d180a81228 (diff) | |
download | systemd-e3643b00a86f41f7c7eea188b392982195182601.tar.gz |
test-path: decrease variable scope
-rw-r--r-- | src/test/test-path.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/test-path.c b/src/test/test-path.c index 0b2b4ab554..e8844fd5ef 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -346,10 +346,8 @@ int main(int argc, char *argv[]) { NULL, }; - _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; _cleanup_free_ char *test_path = NULL; - const test_function_t *test = NULL; - Manager *m = NULL; + _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; umask(022); @@ -359,7 +357,8 @@ int main(int argc, char *argv[]) { assert_se(set_unit_path(test_path) >= 0); assert_se(runtime_dir = setup_fake_runtime_dir()); - for (test = tests; test && *test; test++) { + for (const test_function_t *test = tests; test && *test; test++) { + Manager *m = NULL; int r; /* We create a clean environment for each test */ |