summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index bfc45e722..1c2a18ba9 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -964,12 +964,9 @@ chmod (const char *path, mode_t mode)
if (!SetFileAttributes (win32_path, win32_path))
__seterrno ();
- else
- {
- /* Correct NTFS security attributes have higher priority */
- if (res == 0 || !allow_ntsec)
- res = 0;
- }
+ else if (!allow_ntsec)
+ /* Correct NTFS security attributes have higher priority */
+ res = 0;
}
done: