Skip to content

Commit f7adb52

Browse files
crafcat7xiaoxiang781216
authored andcommitted
hostfs_ioctl:Fixed the error:expected expression caused by not adding parentheses in switch
hostfs/hostfs.c:612:17: error: expected expression FAR char *path = (FAR char *)(uintptr_t)arg; Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
1 parent def05eb commit f7adb52

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

fs/hostfs/hostfs.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,14 @@ static int hostfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
609609
switch (cmd)
610610
{
611611
case FIOC_FILEPATH:
612-
FAR char *path = (FAR char *)(uintptr_t)arg;
613-
ret = inode_getpath(filep->f_inode, path, PATH_MAX);
614-
if (ret >= 0)
615-
{
616-
strlcat(path, hf->relpath, PATH_MAX);
617-
}
612+
{
613+
FAR char *path = (FAR char *)(uintptr_t)arg;
614+
ret = inode_getpath(filep->f_inode, path, PATH_MAX);
615+
if (ret >= 0)
616+
{
617+
strlcat(path, hf->relpath, PATH_MAX);
618+
}
619+
}
618620

619621
break;
620622
default:

0 commit comments

Comments
 (0)