Skip to content

Commit

Permalink
Fixed missing definition of lfs_cache_drop in readonly mode
Browse files Browse the repository at this point in the history
Interestingly this was introduced by two different PRs which were not tested
together until pre-release testing:

- Fix lfs_file_seek doesn't update cache properties correctly
- Fix compiler warnings when LFS_READONLY defined
  • Loading branch information
geky committed Mar 22, 2022
1 parent c676bce commit 9c7e232
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@

/// Caching block device operations ///

#ifndef LFS_READONLY
static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) {
// do not zero, cheaper if cache is readonly or only going to be
// written with identical data (during relocates)
(void)lfs;
rcache->block = LFS_BLOCK_NULL;
}
#endif

static inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache) {
// zero to avoid information leak
Expand Down

0 comments on commit 9c7e232

Please sign in to comment.