mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-01 12:20:02 +00:00
Dropped redundant isuncryst check in lfs3_file_flush_
Saves a bit of code, at the cost of making this logic a bit more
difficult to read:
code stack ctx
before: 36992 2352 684
after: 36972 (-0.1%) 2352 (+0.0%) 684 (+0.0%)
This commit is contained in:
18
lfs3.c
18
lfs3.c
@ -13993,18 +13993,14 @@ static int lfs3_file_flush_(lfs3_t *lfs3, lfs3_file_t *file,
|
||||
|
||||
// if we're mid-crystallization, finish crystallizing the block
|
||||
// and graft it into our bshrub/btree
|
||||
if (lfs3_o_isuncryst(file->b.h.flags)) {
|
||||
// finish crystallizing
|
||||
err = lfs3_file_crystallize(lfs3, file);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
err = lfs3_file_crystallize(lfs3, file);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// and graft into tree
|
||||
err = lfs3_file_graft(lfs3, file);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
err = lfs3_file_graft(lfs3, file);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// before we can crystallize we need to figure out the best
|
||||
|
||||
Reference in New Issue
Block a user