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:
Christopher Haster
2025-08-04 16:05:32 -05:00
parent be3e61dd13
commit 83196ed67a

18
lfs3.c
View File

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