Skip to content

Commit 6bb3706

Browse files
de-nordicnashif
authored andcommitted
tests/settings: Add fs_file_t type variable initializations
The commit adds initializations of fs_file_t variables in preparation for fs_open function change that will require fs_file_t object, passed to the function, to be initialized before first usage. Signed-off-by: Dominik Ermel <[email protected]>
1 parent 9fdf06e commit 6bb3706

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/subsys/settings/fs/src/settings_test_fs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ int fsutil_read_file(const char *path, off_t offset, size_t len, void *dst,
151151
int rc;
152152
ssize_t r_len = 0;
153153

154+
fs_file_t_init(&file);
155+
154156
rc = fs_open(&file, path, FS_O_CREATE | FS_O_RDWR);
155157
if (rc != 0) {
156158
return rc;
@@ -172,6 +174,8 @@ int fsutil_write_file(const char *path, const void *data, size_t len)
172174
struct fs_file_t file;
173175
int rc;
174176

177+
fs_file_t_init(&file);
178+
175179
rc = fs_open(&file, path, FS_O_CREATE | FS_O_RDWR);
176180
if (rc != 0) {
177181
return rc;

0 commit comments

Comments
 (0)