Browse Source

[LibOS] Remove abused goto in shim_ioctl.c

Isaku Yamahata 6 years ago
parent
commit
799dfe36db
1 changed files with 1 additions and 6 deletions
  1. 1 6
      LibOS/shim/src/sys/shim_ioctl.c

+ 1 - 6
LibOS/shim/src/sys/shim_ioctl.c

@@ -430,20 +430,15 @@ int shim_do_ioctl (int fd, int cmd, unsigned long arg)
                     break;
 
                 size = stat.st_size;
-                goto done_fioread;
-            }
-
-            if (hdl->pal_handle) {
+            } else if (hdl->pal_handle) {
                 PAL_STREAM_ATTR attr;
                 if (!DkStreamAttributesQueryByHandle(hdl->pal_handle, &attr)) {
                     ret = -PAL_ERRNO;
                     break;
                 }
                 size = attr.pending_size;
-                goto done_fioread;
             }
 
-done_fioread:
             if (fs->fs_ops->seek) {
                 ret = fs->fs_ops->seek(hdl, 0, SEEK_CUR);
                 if (ret < 0)