diff options
Diffstat (limited to 'winsup/cygwin/fcntl.cc')
-rw-r--r-- | winsup/cygwin/fcntl.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/winsup/cygwin/fcntl.cc b/winsup/cygwin/fcntl.cc index 17889ac98..95b622c04 100644 --- a/winsup/cygwin/fcntl.cc +++ b/winsup/cygwin/fcntl.cc @@ -41,13 +41,7 @@ _fcntl (int fd, int cmd,...) if (cmd != F_DUPFD) res = cfd->fcntl(cmd, arg); else - { - cygheap_fdnew newfd; - if (newfd >= 0) - res = dup2 (fd, newfd); - else - res = -1; - } + res = dup2 (fd, cygheap_fdnew (((int) arg) - 1)); va_end (args); done: |