From 3bbdb535438951ffb8eac78abbf4152dcfa2185d Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 20 Feb 2019 15:24:47 +0100 Subject: lib/tests: Use ARRAY_SIZE Except in igt_simulation.c where we use tricks and intentionally only want part of the array in some cases. Suggested-by: Arkadiusz Hiler Cc: Arkadiusz Hiler Reviewed-by: Arkadiusz Hiler Signed-off-by: Daniel Vetter --- lib/tests/igt_segfault.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/tests/igt_segfault.c') diff --git a/lib/tests/igt_segfault.c b/lib/tests/igt_segfault.c index 2a24531a..0d872f67 100644 --- a/lib/tests/igt_segfault.c +++ b/lib/tests/igt_segfault.c @@ -65,15 +65,13 @@ static int do_fork(void) case -1: internal_assert(0); case 0: + argc = ARRAY_SIZE(argv_run); if (simple) { - argc = 1; igt_simple_init(argc, argv_run); crashme(); igt_exit(); } else { - - argc = 1; igt_subtest_init(argc, argv_run); if(runa) -- cgit v1.2.3