mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-26 09:08:30 +00:00
initlize struct lfs_diskoff disk = {0}
so we don't use it uninitlized in first run
This commit is contained in:
committed by
Christopher Haster
parent
611c9b20db
commit
5a834b6fc1
2
lfs.c
2
lfs.c
@@ -877,7 +877,7 @@ static int lfs_dir_traverse(lfs_t *lfs,
|
|||||||
// iterate over directory and attrs
|
// iterate over directory and attrs
|
||||||
lfs_tag_t tag;
|
lfs_tag_t tag;
|
||||||
const void *buffer;
|
const void *buffer;
|
||||||
struct lfs_diskoff disk;
|
struct lfs_diskoff disk = {0};
|
||||||
while (true) {
|
while (true) {
|
||||||
{
|
{
|
||||||
if (off+lfs_tag_dsize(ptag) < dir->off) {
|
if (off+lfs_tag_dsize(ptag) < dir->off) {
|
||||||
|
|||||||
Reference in New Issue
Block a user