summaryrefslogtreecommitdiff
path: root/lib/tests/igt_exit_handler.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2019-02-20 15:24:47 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2019-02-21 00:41:54 +0100
commit3bbdb535438951ffb8eac78abbf4152dcfa2185d (patch)
treeee334b938eacaaf28f6776c66c937a6bd1f3eccb /lib/tests/igt_exit_handler.c
parentee6e006202a50c5aef373c0b075027ed7177935a (diff)
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 <arkadiusz.hiler@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/tests/igt_exit_handler.c')
-rw-r--r--lib/tests/igt_exit_handler.c3
1 files changed, 2 insertions, 1 deletions
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 <sys/types.h>
#include <sys/wait.h>
#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;