Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSipke Vriend <sipke.vriend@miot.com.au>2019-10-01 07:22:01 +0300
committerSipke Vriend <sipke.vriend@miot.com.au>2019-10-01 07:22:01 +0300
commit241dbc6f86fc37efb2e918b649a8ab0ba36b2155 (patch)
tree907940682dc7db40f42c6253869cb00ba6c2b731
parent8cca58f1a6162592696ec7964c5bd7f2582de924 (diff)
lfs_stat: Cast error return codes to int.
For correctness, cast the lfs_stag_t variables to int when returning a negative error code.
-rw-r--r--lfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs.c b/lfs.c
index bf60852..e856758 100644
--- a/lfs.c
+++ b/lfs.c
@@ -3076,7 +3076,7 @@ int lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info) {
lfs_stag_t tag = lfs_dir_find(lfs, &cwd, &path, NULL);
if (tag < 0) {
LFS_TRACE("lfs_stat -> %d", tag);
- return tag;
+ return (int)tag;
}
int err = lfs_dir_getinfo(lfs, &cwd, lfs_tag_id(tag), info);