https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0b0b2b96f2039403e456b1c84f6300cdef0696c0
commit 0b0b2b96f2039403e456b1c84f6300cdef0696c0 Author: Corinna Vinschen <cori...@vinschen.de> Date: Tue Nov 14 21:29:08 2017 +0100 Cygwin: link: Simplify an expression Signed-off-by: Corinna Vinschen <cori...@vinschen.de> Diff: --- winsup/cygwin/fhandler_disk_file.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 2f96740..5dfcae4 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1237,16 +1237,11 @@ fhandler_disk_file::link (const char *newpath) { if (status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_NOT_SUPPORTED) - { - /* FS doesn't support hard links. Linux returns EPERM. */ - set_errno (EPERM); - return -1; - } + /* FS doesn't support hard links. Linux returns EPERM. */ + set_errno (EPERM); else - { - __seterrno_from_nt_status (status); - return -1; - } + __seterrno_from_nt_status (status); + return -1; } else if (pc.file_attributes () & FILE_ATTRIBUTE_TEMPORARY) {