@@ -1723,7 +1723,7 @@ static int lfsr_data_readle32(lfs_t *lfs, lfsr_data_t *data,
17231723 return LFS_ERR_CORRUPT ;
17241724 }
17251725
1726- * word = lfs_fromle32_ (buf );
1726+ * word = lfs_fromle32 (buf );
17271727 return 0 ;
17281728}
17291729
@@ -1904,7 +1904,7 @@ static int lfsr_bd_progdata(lfs_t *lfs,
19041904
19051905static inline lfsr_data_t lfsr_data_fromle32 (uint32_t word ,
19061906 uint8_t buffer [static LFSR_LE32_DSIZE ]) {
1907- lfs_tole32_ (word , buffer );
1907+ lfs_tole32 (word , buffer );
19081908 return LFSR_DATA_BUF (buffer , LFSR_LE32_DSIZE );
19091909}
19101910
@@ -2329,7 +2329,7 @@ static lfsr_data_t lfsr_data_fromecksum(const lfsr_ecksum_t *ecksum,
23292329 }
23302330 d += d_ ;
23312331
2332- lfs_tole32_ (ecksum -> cksum , & buffer [d ]);
2332+ lfs_tole32 (ecksum -> cksum , & buffer [d ]);
23332333 d += 4 ;
23342334
23352335 return LFSR_DATA_BUF (buffer , d );
@@ -2473,7 +2473,7 @@ static lfsr_data_t lfsr_data_frombptr(const lfsr_bptr_t *bptr,
24732473 }
24742474 d += d_ ;
24752475
2476- lfs_tole32_ (lfsr_bptr_cksum (bptr ), & buffer [d ]);
2476+ lfs_tole32 (lfsr_bptr_cksum (bptr ), & buffer [d ]);
24772477 d += 4 ;
24782478
24792479 return LFSR_DATA_BUF (buffer , d );
@@ -2779,7 +2779,7 @@ static int lfsr_rbyd_fetch_(lfs_t *lfs,
27792779 }
27802780 return err ;
27812781 }
2782- cksum__ = lfs_fromle32_ (& cksum__ );
2782+ cksum__ = lfs_fromle32 (& cksum__ );
27832783
27842784 if (cksum_ != cksum__ ) {
27852785 // uh oh, checksums don't match
@@ -3140,7 +3140,7 @@ static int lfsr_rbyd_appendrev(lfs_t *lfs, lfsr_rbyd_t *rbyd, uint32_t rev) {
31403140 // revision count stored as le32, we don't use a leb128 encoding as we
31413141 // intentionally allow the revision count to overflow
31423142 uint8_t rev_buf [sizeof (uint32_t )];
3143- lfs_tole32_ (rev , & rev_buf );
3143+ lfs_tole32 (rev , & rev_buf );
31443144
31453145 int err = lfsr_bd_prog (lfs ,
31463146 rbyd -> blocks [0 ], lfsr_rbyd_eoff (rbyd ),
@@ -4264,7 +4264,7 @@ static int lfsr_rbyd_appendcksum_(lfs_t *lfs, lfsr_rbyd_t *rbyd,
42644264 // note the odd-parity zero preserves our position in the crc32c
42654265 // ring while only changing the parity
42664266 cksum_ ^= (lfsr_rbyd_isperturb (rbyd )) ? LFS_CRC32C_ODDZERO : 0 ;
4267- lfs_tole32_ (cksum_ , & cksum_buf [2 + 1 + 4 ]);
4267+ lfs_tole32 (cksum_ , & cksum_buf [2 + 1 + 4 ]);
42684268
42694269 // prog, when this lands on disk commit is committed
42704270 int err = lfsr_bd_prog (lfs , rbyd -> blocks [0 ], lfsr_rbyd_eoff (rbyd ),
@@ -4847,7 +4847,7 @@ static lfsr_data_t lfsr_data_frombranch(const lfsr_rbyd_t *branch,
48474847 }
48484848 d += d_ ;
48494849
4850- lfs_tole32_ (branch -> cksum , & buffer [d ]);
4850+ lfs_tole32 (branch -> cksum , & buffer [d ]);
48514851 d += 4 ;
48524852
48534853 return LFSR_DATA_BUF (buffer , d );
@@ -7284,7 +7284,7 @@ static int lfsr_mdir_fetch(lfs_t *lfs, lfsr_mdir_t *mdir,
72847284 if (err && err != LFS_ERR_CORRUPT ) {
72857285 return err ;
72867286 }
7287- revs [i ] = lfs_fromle32_ (& revs [i ]);
7287+ revs [i ] = lfs_fromle32 (& revs [i ]);
72887288
72897289 if (i == 0
72907290 || err == LFS_ERR_CORRUPT
@@ -7539,7 +7539,7 @@ static int lfsr_mdir_alloc__(lfs_t *lfs, lfsr_mdir_t *mdir,
75397539 return err ;
75407540 }
75417541 // note we allow corrupt errors here, as long as they are consistent
7542- rev = (err != LFS_ERR_CORRUPT ) ? lfs_fromle32_ (& rev ) : 0 ;
7542+ rev = (err != LFS_ERR_CORRUPT ) ? lfs_fromle32 (& rev ) : 0 ;
75437543 // reset recycle bits in revision count and increment
75447544 rev = lfsr_rev_init (lfs , mdir , rev );
75457545
@@ -7583,7 +7583,7 @@ static int lfsr_mdir_swap__(lfs_t *lfs, lfsr_mdir_t *mdir_,
75837583 return err ;
75847584 }
75857585 // note we allow corrupt errors here, as long as they are consistent
7586- rev = (err != LFS_ERR_CORRUPT ) ? lfs_fromle32_ (& rev ) : 0 ;
7586+ rev = (err != LFS_ERR_CORRUPT ) ? lfs_fromle32 (& rev ) : 0 ;
75877587 // increment our revision count
75887588 rev = lfsr_rev_inc (lfs , rev );
75897589
@@ -10889,7 +10889,7 @@ int lfsr_setattr(lfs_t *lfs, const char *path, uint8_t type,
1088910889 }
1089010890
1089110891 lfs_size_t d = lfs_min (size , file -> cfg -> attrs [i ].buffer_size );
10892- memcpy (file -> cfg -> attrs [i ].buffer , buffer , d );
10892+ lfs_memcpy (file -> cfg -> attrs [i ].buffer , buffer , d );
1089310893 if (file -> cfg -> attrs [i ].size ) {
1089410894 * file -> cfg -> attrs [i ].size = d ;
1089510895 }
@@ -13018,7 +13018,7 @@ int lfsr_file_sync(lfs_t *lfs, lfsr_file_t *file) {
1301813018 lfs_size_t d = lfs_min (
1301913019 lfsr_attr_size (& file -> cfg -> attrs [i ]),
1302013020 file_ -> cfg -> attrs [j ].buffer_size );
13021- memcpy (file_ -> cfg -> attrs [j ].buffer ,
13021+ lfs_memcpy (file_ -> cfg -> attrs [j ].buffer ,
1302213022 file -> cfg -> attrs [i ].buffer ,
1302313023 d );
1302413024 if (file_ -> cfg -> attrs [j ].size ) {
@@ -13825,7 +13825,7 @@ static int lfsr_data_readcompat(lfs_t *lfs, lfsr_data_t *data,
1382513825 if (d < 0 ) {
1382613826 return d ;
1382713827 }
13828- * compat = lfs_fromle32_ (buf );
13828+ * compat = lfs_fromle32 (buf );
1382913829
1383013830 // if any out-of-range flags are set, set the internal overflow bit,
1383113831 // this is a compromise in correctness and and compat-flag complexity
0 commit comments