diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index d032155eb7..2815ed80ee 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -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: