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.
This commit is contained in:
Sipke Vriend
2019-09-30 08:28:03 +10:00
parent fd204ac2fb
commit 0b5a78e2cd

2
lfs.c
View File

@@ -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;