浏览代码

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.
Sipke Vriend 6 年之前
父节点
当前提交
0b5a78e2cd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lfs.c

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