Explorar o código

[LibOS] Remove abused goto in shim_ioctl.c

Isaku Yamahata %!s(int64=6) %!d(string=hai) anos
pai
achega
799dfe36db
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  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)