Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-03-19 16:33:51 +0300
committerCorinna Vinschen <corinna@vinschen.de>2001-03-19 16:33:51 +0300
commit98750a84047ec2ab23c3c74006e29319ce66e595 (patch)
tree4574c736352a6b51b6dabebef6225d4fb85e8fde /winsup/cygwin/mmap.cc
parentca05a71296f2a1e650b5a4368624351bc6522979 (diff)
* mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
file descriptor is -1.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r--winsup/cygwin/mmap.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 4ad970ae8..e1fc2d621 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -313,7 +313,7 @@ map::get_list_by_fd (int fd)
#else /* so we use the name hash value to identify the file unless
it's not an anonymous mapping. */
if ((fd == -1 && lists[i]->fd == -1)
- || lists[i]->hash == fdtab[fd]->get_namehash ())
+ || (fd != -1 && lists[i]->hash == fdtab[fd]->get_namehash ()))
#endif
return lists[i];
return 0;