diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-06-21 13:39:35 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-06-21 13:39:35 +0200 |
commit | 2c832271127f2ae7eea4245dc940d8a5c1fe7498 (patch) | |
tree | 097aea7eda806dd77e909694bbce6d78cc5fda9d | |
parent | 4965cdc9ad2753f7aa91711e2862d7e350168bef (diff) | |
download | newlib-2c832271127f2ae7eea4245dc940d8a5c1fe7498.zip newlib-2c832271127f2ae7eea4245dc940d8a5c1fe7498.tar.gz newlib-2c832271127f2ae7eea4245dc940d8a5c1fe7498.tar.bz2 |
Drop useless calls to path_conv.isgood_inode
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index f4b5284..5148dd7 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -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; |