mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
mmap(2) returns MAP_FAILED, not NULL, on failure
Signed-off-by: Michael McConville <mmcco@mykolab.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
9aae6e549d
commit
ab1ce9bd48
@ -199,7 +199,7 @@ static void xen_remap_bucket(MapCacheEntry *entry,
|
||||
*/
|
||||
vaddr_base = mmap(vaddr, size, PROT_READ | PROT_WRITE,
|
||||
MAP_ANON | MAP_SHARED, -1, 0);
|
||||
if (vaddr_base == NULL) {
|
||||
if (vaddr_base == MAP_FAILED) {
|
||||
perror("mmap");
|
||||
exit(-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user