tests: posix: fs: correct arguments to readdir_r()

Previously, a NULL pointer was passed as the second argument to
readdir_r(). This is incorrect. The passed pointer should be
to a valid, externally-allocated struct direct.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
Chris Friedt 2024-12-26 05:19:17 -05:00 committed by Benjamin Cabé
commit e967120b9a

View file

@ -57,10 +57,10 @@ static int test_mkdir(void)
static struct dirent *readdir_wrap(DIR *dirp, bool thread_safe)
{
if (thread_safe) {
struct dirent *entry = NULL;
struct dirent entry;
struct dirent *result = NULL;
zassert_ok(readdir_r(dirp, entry, &result));
zassert_ok(readdir_r(dirp, &entry, &result));
return result;
} else {