Skip to content

Commit

Permalink
Replace erroneous LFS_FILE_MAX upper bound 4294967296 to 4294967295
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Oct 30, 2023
1 parent 8f9427d commit c531a5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lfs.c
Expand Up @@ -13,8 +13,8 @@
#error "LFS_NAME_MAX must be in the range (0, 1022]"
#endif

#if (LFS_FILE_MAX <= 0) || (LFS_FILE_MAX > 4294967296)
#error "LFS_FILE_MAX must be in the range (0, 4294967296]"
#if (LFS_FILE_MAX <= 0) || (LFS_FILE_MAX > 4294967295)
#error "LFS_FILE_MAX must be in the range (0, 4294967295]"
#endif

#if (LFS_FILE_MAX > 2147483647)
Expand Down
2 changes: 1 addition & 1 deletion lfs.h
Expand Up @@ -52,7 +52,7 @@ typedef uint32_t lfs_block_t;
#endif

// Maximum size of a file in bytes, may be redefined to limit to support other
// drivers. Limited on disk to <= 4294967296. However, above 2147483647 the
// drivers. Limited on disk to <= 4294967295. However, above 2147483647 the
// functions lfs_file_seek, lfs_file_size, and lfs_file_tell will return
// incorrect values due to using signed integers. Stored in superblock and
// must be respected by other littlefs drivers.
Expand Down

0 comments on commit c531a5e

Please sign in to comment.