Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3905,6 +3905,12 @@ static int lfs_init(lfs_t *lfs, const struct lfs_config *cfg) {
lfs->cfg = cfg;
int err = 0;

// check that bool is a truthy-preserving type
//
// note the most common reason for this failure is a before-c99 compiler,
// which littlefs currently does not support
LFS_ASSERT((bool)0x80000000);

// validate that the lfs-cfg sizes were initiated properly before
// performing any arithmetic logics with them
LFS_ASSERT(lfs->cfg->read_size != 0);
Expand Down