* mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when

file descriptor is -1.
This commit is contained in:
Corinna Vinschen 2001-03-19 13:33:51 +00:00
parent ca05a71296
commit 98750a8404
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Mar 19 14:32:00 2001 Corinna Vinschen <corinna@vinschen.de>
* mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
file descriptor is -1.
Sat Mar 17 18:30:00 2001 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (check_posix_perm): New static function.

View File

@ -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;