From f90d2d7bf1b6fc7469fbdeaca17c33a1f5b73cc8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 4 Sep 2020 16:06:07 +0200 Subject: [PATCH] test-execute: simplify condition tests is always a static array, it cannot be NULL. --- src/test/test-execute.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 9ca06202165..b759786eafb 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -782,7 +782,6 @@ typedef struct test_entry { #define entry(x) {x, #x} static int run_tests(UnitFileScope scope, const test_entry tests[], char **patterns) { - const test_entry *test = NULL; _cleanup_(manager_freep) Manager *m = NULL; int r; @@ -795,7 +794,7 @@ static int run_tests(UnitFileScope scope, const test_entry tests[], char **patte assert_se(r >= 0); assert_se(manager_startup(m, NULL, NULL) >= 0); - for (test = tests; test && test->f; test++) + for (const test_entry *test = tests; test->f; test++) if (strv_fnmatch_or_empty(patterns, test->name, FNM_NOESCAPE)) test->f(m); else -- 2.47.3