From 955b296bcc893cb78566355b2195ea51cb4a30f6 Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Tue, 1 Oct 2019 14:22:25 +1000 Subject: [PATCH] lfs_file_rewind: Cast error return codes to int. For correctness, cast the lfs_stag_t variables to int when returning a negative error code. --- lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs.c b/lfs.c index e8567589..8bb3653f 100644 --- a/lfs.c +++ b/lfs.c @@ -3047,7 +3047,7 @@ int lfs_file_rewind(lfs_t *lfs, lfs_file_t *file) { lfs_soff_t res = lfs_file_seek(lfs, file, 0, LFS_SEEK_SET); if (res < 0) { LFS_TRACE("lfs_file_rewind -> %d", res); - return res; + return (int)res; } LFS_TRACE("lfs_file_rewind -> %d", 0);