summaryrefslogtreecommitdiff
path: root/tools/perf/tests/builtin-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r--tools/perf/tests/builtin-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 35cc3807cc9e..b89d69afcef0 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -256,8 +256,8 @@ static int run_test(struct test_suite *test, int subtest)
}
#define for_each_test(j, k, t) \
- for (j = 0; j < ARRAY_SIZE(tests); j++) \
- for (k = 0, t = tests[j][k]; tests[j][k]; k++, t = tests[j][k])
+ for (j = 0, k = 0; j < ARRAY_SIZE(tests); j++, k = 0) \
+ while ((t = tests[j][k++]) != NULL)
static int test_and_print(struct test_suite *t, int subtest)
{