mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
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:
+8
-6
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user