Fixed assert with branches in lfs3_file_traverse_
This was modified incorrectly for LFS3_2BONLY. We do actually end up
with non-bptr non-data tags here when we encounter btree inner nodes.
Code changes:
code stack ctx
before: 37864 2416 636
after: 37888 (+0.1%) 2416 (+0.0%) 636 (+0.0%)
This commit is contained in:
@@ -14208,9 +14208,7 @@ static int lfs3_file_traverse_(lfs3_t *lfs3, const lfs3_bshrub_t *bshrub,
|
||||
}
|
||||
|
||||
// decode bptrs
|
||||
if (tag == LFS3_TAG_DATA) {
|
||||
bptr->data = data;
|
||||
} else if (LFS3_IFDEF_2BONLY(false, tag == LFS3_TAG_BLOCK)) {
|
||||
if (LFS3_IFDEF_2BONLY(false, tag == LFS3_TAG_BLOCK)) {
|
||||
#ifndef LFS3_2BONLY
|
||||
err = lfs3_data_readbptr(lfs3, &data,
|
||||
bptr);
|
||||
@@ -14219,7 +14217,7 @@ static int lfs3_file_traverse_(lfs3_t *lfs3, const lfs3_bshrub_t *bshrub,
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
LFS3_UNREACHABLE();
|
||||
bptr->data = data;
|
||||
}
|
||||
|
||||
if (tag_) {
|
||||
|
||||
Reference in New Issue
Block a user