Skip to content

Commit 8b6e51d

Browse files
committed
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%)
1 parent d183a88 commit 8b6e51d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lfs3.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14208,9 +14208,7 @@ static int lfs3_file_traverse_(lfs3_t *lfs3, const lfs3_bshrub_t *bshrub,
1420814208
}
1420914209

1421014210
// decode bptrs
14211-
if (tag == LFS3_TAG_DATA) {
14212-
bptr->data = data;
14213-
} else if (LFS3_IFDEF_2BONLY(false, tag == LFS3_TAG_BLOCK)) {
14211+
if (LFS3_IFDEF_2BONLY(false, tag == LFS3_TAG_BLOCK)) {
1421414212
#ifndef LFS3_2BONLY
1421514213
err = lfs3_data_readbptr(lfs3, &data,
1421614214
bptr);
@@ -14219,7 +14217,7 @@ static int lfs3_file_traverse_(lfs3_t *lfs3, const lfs3_bshrub_t *bshrub,
1421914217
}
1422014218
#endif
1422114219
} else {
14222-
LFS3_UNREACHABLE();
14220+
bptr->data = data;
1422314221
}
1422414222

1422514223
if (tag_) {

0 commit comments

Comments
 (0)