lib/posix/fs: Add fs_dir_t type variable initialization

The commit adds initialization of fs_dir_t variables in preparation
for fs_opendir function change that will require fs_dir_t object, passed
to the function, to be initialized before first usage.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
Andrzej Puzdrowski 2021-02-03 12:18:05 +01:00 committed by Anas Nashif
commit 8339da6da6

View file

@ -230,7 +230,7 @@ DIR *opendir(const char *dirname)
return NULL;
}
(void)memset(&ptr->dir, 0, sizeof(ptr->dir));
fs_dir_t_init(&ptr->dir);
rc = fs_opendir(&ptr->dir, dirname);
if (rc < 0) {