Skip to content
Snippets Groups Projects
Commit 972fe2bf authored by rtoy's avatar rtoy
Browse files

Merge fix from release-19e-branch. os_validate should return NULL on

failure instead of -1.
parent c4061b8f
No related branches found
No related tags found
No related merge requests found
/* /*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/solaris-os.c,v 1.18 2006/07/17 15:50:52 rtoy Exp $ * $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/solaris-os.c,v 1.19 2008/02/27 21:54:42 rtoy Exp $
* *
* OS-dependent routines. This file (along with os.h) exports an * OS-dependent routines. This file (along with os.h) exports an
* OS-independent interface to the operating system VM facilities. * OS-independent interface to the operating system VM facilities.
...@@ -103,11 +103,12 @@ os_vm_address_t os_validate(os_vm_address_t addr, os_vm_size_t len) ...@@ -103,11 +103,12 @@ os_vm_address_t os_validate(os_vm_address_t addr, os_vm_size_t len)
if (addr) if (addr)
flags |= MAP_FIXED; flags |= MAP_FIXED;
if ( addr = (os_vm_address_t) mmap((void *) addr, len, OS_VM_PROT_ALL, flags, zero_fd, 0);
(addr =
(os_vm_address_t) mmap((void *) addr, len, OS_VM_PROT_ALL, flags, if (addr == (os_vm_address_t) - 1) {
zero_fd, 0)) == (os_vm_address_t) - 1)
perror("mmap"); perror("mmap");
addr = NULL;
}
return addr; return addr;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment