Browse Source

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.
Sipke Vriend 6 years ago
parent
commit
955b296bcc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lfs.c

+ 1 - 1
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);