]> sourceware.org Git - newlib-cygwin.git/commitdiff
Drop useless calls to path_conv.isgood_inode
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 21 Jun 2016 11:39:35 +0000 (13:39 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 21 Jun 2016 11:39:35 +0000 (13:39 +0200)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/fhandler_disk_file.cc

index f4b52844693233897f978e552757e747ff56ee6b..5148dd7ae6e9485e1118d09390641d3ca740559c 100644 (file)
@@ -334,8 +334,7 @@ fhandler_base::fstat_by_handle (struct stat *buf)
         return -1;
        }
     }
-  if (pc.hasgood_inode ()
-      && pc.isgood_inode (pc.fai ()->InternalInformation.IndexNumber.QuadPart))
+  if (pc.isgood_inode (pc.fai ()->InternalInformation.IndexNumber.QuadPart))
     ino = pc.fai ()->InternalInformation.IndexNumber.QuadPart;
   return fstat_helper (buf);
 }
@@ -463,10 +462,7 @@ fhandler_base::fstat_helper (struct stat *buf)
   buf->st_nlink = pc.fai()->StandardInformation.NumberOfLinks;
 
   /* Enforce namehash as inode number on untrusted file systems. */
-  if (ino && pc.isgood_inode (ino))
-    buf->st_ino = (ino_t) ino;
-  else
-    buf->st_ino = get_ino ();
+  buf->st_ino = ino ?: get_ino ();
 
   buf->st_blksize = PREFERRED_IO_BLKSIZE;
 
This page took 0.03476 seconds and 5 git commands to generate.