Prefer function-like macros when the result is a struct

This commit is contained in:
Christopher Haster
2023-09-14 13:35:49 -05:00
parent 518e9634e7
commit d44f9bdcd0
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -4226,7 +4226,7 @@ code = '''
uint8_t *seen = malloc((BLOCK_COUNT+7)/8);
memset(seen, 0, (BLOCK_COUNT+7)/8);
lfsr_btree_traversal_t traversal = LFSR_BTREE_TRAVERSAL;
lfsr_btree_traversal_t traversal = LFSR_BTREE_TRAVERSAL();
for (lfs_block_t i = 0;; i++) {
// a bit hacky, but this catches infinite loops
@@ -4374,7 +4374,7 @@ code = '''
uint8_t *seen = malloc((BLOCK_COUNT+7)/8);
memset(seen, 0, (BLOCK_COUNT+7)/8);
lfsr_btree_traversal_t traversal = LFSR_BTREE_TRAVERSAL;
lfsr_btree_traversal_t traversal = LFSR_BTREE_TRAVERSAL();
for (lfs_block_t i = 0;; i++) {
// a bit hacky, but this catches infinite loops
+1 -1
View File
@@ -4246,7 +4246,7 @@ code = '''
uint8_t buf[LFSR_MDIR_DSIZE];
lfsr_mdir_commit(&lfs, &lfs.mroot, LFSR_ATTRS(
LFSR_ATTR(-1,
MROOT, 0, FROMMBLOCKS(&lfs, LFSR_MBLOCKS_MROOTANCHOR,
MROOT, 0, FROMMBLOCKS(&lfs, LFSR_MBLOCKS_MROOTANCHOR(),
buf)))) => 0;
// technically, cycle detection only needs to work when we're validating