Skip to content

Commit

Permalink
hostfs_ioctl:Fixed the error:expected expression caused by not adding…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
crafcat7 authored and xiaoxiang781216 committed Aug 18, 2024
1 parent def05eb commit f7adb52
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions fs/hostfs/hostfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f7adb52

Please sign in to comment.