Skip to content

Commit f144dea

Browse files
de-nordicnashif
authored andcommitted
samples: littlefs: 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 ba3b1ba commit f144dea

File tree

1 file changed

+2
-0
lines changed
  • samples/subsys/fs/littlefs/src

1 file changed

+2
-0
lines changed

samples/subsys/fs/littlefs/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ void main(void)
9999

100100
struct fs_file_t file;
101101

102+
fs_file_t_init(&file);
103+
102104
rc = fs_open(&file, fname, FS_O_CREATE | FS_O_RDWR);
103105
if (rc < 0) {
104106
printk("FAIL: open %s: %d\n", fname, rc);

0 commit comments

Comments
 (0)