From 52e45096df8cbf6af0641004453369ef415249c5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 31 Mar 2015 14:31:24 +0200 Subject: [PATCH] Do not pass NULL to access() Avoid that Valgrind complains about passing a NULL pointer as first argument to access(). Signed-off-by: Bart Van Assche --- test-tool/iscsi-test-cu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-tool/iscsi-test-cu.c b/test-tool/iscsi-test-cu.c index b6a8ce4..252cd6f 100644 --- a/test-tool/iscsi-test-cu.c +++ b/test-tool/iscsi-test-cu.c @@ -824,9 +824,9 @@ add_tests(const char *testname_re) static void parse_and_add_tests(char *testname_re); -static void parse_and_add_test(char *test) +static void parse_and_add_test(const char *test) { - if (access(test, F_OK) == 0) { + if (test && access(test, F_OK) == 0) { FILE *fh; char t[256];