From 0b5a78e2cd5c0fc927a6828e01a0aee08d1f5e0d Mon Sep 17 00:00:00 2001 From: Sipke Vriend Date: Mon, 30 Sep 2019 08:28:03 +1000 Subject: [PATCH] Adjust lfs_dir_find return code to ensure 32 bit value. lfs_dir_find returns either a negative return code or a tag. For 32 bit machines with int as 32 bits this co-incides, but for smaller bit processors, we need to ensure a 32 bit value is returned so change the return type to lfs_stag_t. --- lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfs.c b/lfs.c index e2ab1e57..c8583ae8 100644 --- a/lfs.c +++ b/lfs.c @@ -1062,7 +1062,7 @@ static int lfs_dir_find_match(void *data, return LFS_CMP_EQ; } -static int lfs_dir_find(lfs_t *lfs, lfs_mdir_t *dir, +static lfs_stag_t lfs_dir_find(lfs_t *lfs, lfs_mdir_t *dir, const char **path, uint16_t *id) { // we reduce path to a single name if we can find it const char *name = *path;