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:
committed by
Ronnie Sahlberg
parent
7187353f5a
commit
52e45096df
@@ -824,9 +824,9 @@ add_tests(const char *testname_re)
|
|||||||
|
|
||||||
static void parse_and_add_tests(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;
|
FILE *fh;
|
||||||
char t[256];
|
char t[256];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user