From 0b0b2b96f2039403e456b1c84f6300cdef0696c0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 14 Nov 2017 21:29:08 +0100 Subject: [PATCH] Cygwin: link: Simplify an expression Signed-off-by: Corinna Vinschen --- 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 2f96740e8..5dfcae4d9 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) {