From 6694f3054e2280f67c17e20e968fffd394e4000b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 4 Jul 2003 09:06:54 +0000 Subject: [PATCH] * mmap.cc (fhandler_disk_file::mmap): Fix address test. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/mmap.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 948d6c2f6..9ecc8f60f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2003-07-04 Corinna Vinschen + + * mmap.cc (fhandler_disk_file::mmap): Fix address test. + 2003-07-03 Christopher Faylor * path.cc (fillout_mntent): Change "posix" to "managed". diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 538ab2058..cd974bed1 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -820,7 +820,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, void *base = NULL; /* If a non-zero address is given, try mapping using the given address first. If it fails and flags is not MAP_FIXED, try again with NULL address. */ - if (addr) + if (*addr) base = MapViewOfFileEx (h, access, high, low, len, *addr); if (!base && !(flags & MAP_FIXED)) base = MapViewOfFileEx (h, access, high, low, len, NULL);