From 867d201bce9e4d02dc743e2c6c051280cee875a3 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Sat, 15 Nov 2025 02:01:04 -0600 Subject: [PATCH] Bumped seek whence up to uint32_t I can't think of a reason this should be uint8_t. Bumping it up to uint32_t matches the type used for other flags (even though whence is arguably not flags in a strict sense). No code changes. --- lfs3.c | 2 +- lfs3.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lfs3.c b/lfs3.c index 60a3bd80..ed33942a 100644 --- a/lfs3.c +++ b/lfs3.c @@ -14282,7 +14282,7 @@ failed:; // other file operations lfs3_soff_t lfs3_file_seek(lfs3_t *lfs3, lfs3_file_t *file, - lfs3_soff_t off, uint8_t whence) { + lfs3_soff_t off, uint32_t whence) { LFS3_ASSERT(lfs3_handle_isopen(lfs3, &file->b.h)); // TODO check for out-of-range? diff --git a/lfs3.h b/lfs3.h index f9f97c7e..7e4c6213 100644 --- a/lfs3.h +++ b/lfs3.h @@ -1510,7 +1510,7 @@ lfs3_ssize_t lfs3_file_write(lfs3_t *lfs3, lfs3_file_t *file, // The change in position is determined by the offset and whence flag. // Returns the new position of the file, or a negative error code on failure. lfs3_soff_t lfs3_file_seek(lfs3_t *lfs3, lfs3_file_t *file, - lfs3_soff_t off, uint8_t whence); + lfs3_soff_t off, uint32_t whence); // Truncate/grow the size of the file to the specified size //