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>
This commit is contained in:
chenrun1 2024-05-22 21:05:11 +08:00 committed by Xiang Xiao
parent def05ebabb
commit f7adb52c8b

View File

@ -609,12 +609,14 @@ static int hostfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
switch (cmd)
{
case FIOC_FILEPATH:
FAR char *path = (FAR char *)(uintptr_t)arg;
ret = inode_getpath(filep->f_inode, path, PATH_MAX);
if (ret >= 0)
{
strlcat(path, hf->relpath, PATH_MAX);
}
{
FAR char *path = (FAR char *)(uintptr_t)arg;
ret = inode_getpath(filep->f_inode, path, PATH_MAX);
if (ret >= 0)
{
strlcat(path, hf->relpath, PATH_MAX);
}
}
break;
default: