Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Dahamshi <mohammad.dahamshi@solaredge.com>2023-07-11 12:20:43 +0300
committerChristopher Haster <geky@geky.net>2023-08-03 19:21:58 +0300
commit5a834b6fc141ecc561d352545ec2d89f9e598b97 (patch)
tree1ca5cf6576bec5807d2241694a171c774f8e9d83
parent611c9b20db2b99faee261daa7cc9bbe175d3eaca (diff)
initlize struct lfs_diskoff disk = {0}
so we don't use it uninitlized in first run
-rw-r--r--lfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs.c b/lfs.c
index 38b825d..073f84c 100644
--- a/lfs.c
+++ b/lfs.c
@@ -877,7 +877,7 @@ static int lfs_dir_traverse(lfs_t *lfs,
// iterate over directory and attrs
lfs_tag_t tag;
const void *buffer;
- struct lfs_diskoff disk;
+ struct lfs_diskoff disk = {0};
while (true) {
{
if (off+lfs_tag_dsize(ptag) < dir->off) {