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 <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-03-31 14:31:24 +02:00
committed by Ronnie Sahlberg
parent 7187353f5a
commit 52e45096df

View File

@@ -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];