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_exit_handler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/tests/igt_exit_handler.c') diff --git a/lib/tests/igt_exit_handler.c b/lib/tests/igt_exit_handler.c index f8a74786..892a7f14 100644 --- a/lib/tests/igt_exit_handler.c +++ b/lib/tests/igt_exit_handler.c @@ -26,6 +26,7 @@ #include #include #include "igt_core.h" +#include "drmtest.h" #include "igt_tests_common.h" @@ -63,7 +64,7 @@ static int testfunc(enum test_type test_type) { char prog[] = "igt_no_exit"; char *fake_argv[] = {prog}; - int fake_argc = 1; + int fake_argc = ARRAY_SIZE(fake_argv); pid_t pid; int status; char tmp = 0; -- cgit v1.2.3