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 <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
9fdf06e172
commit
6bb3706606
1 changed files with 4 additions and 0 deletions
|
@ -151,6 +151,8 @@ int fsutil_read_file(const char *path, off_t offset, size_t len, void *dst,
|
|||
int rc;
|
||||
ssize_t r_len = 0;
|
||||
|
||||
fs_file_t_init(&file);
|
||||
|
||||
rc = fs_open(&file, path, FS_O_CREATE | FS_O_RDWR);
|
||||
if (rc != 0) {
|
||||
return rc;
|
||||
|
@ -172,6 +174,8 @@ int fsutil_write_file(const char *path, const void *data, size_t len)
|
|||
struct fs_file_t file;
|
||||
int rc;
|
||||
|
||||
fs_file_t_init(&file);
|
||||
|
||||
rc = fs_open(&file, path, FS_O_CREATE | FS_O_RDWR);
|
||||
if (rc != 0) {
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue