initlize struct lfs_diskoff disk = {0}

so we don't use it uninitlized in first run
This commit is contained in:
Mohammad Dahamshi 2023-07-11 12:20:43 +03:00 committed by Christopher Haster
parent 611c9b20db
commit 5a834b6fc1
1 changed files with 1 additions and 1 deletions

2
lfs.c
View File

@ -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) {