Skip to content
Snippets Groups Projects
Commit ab1ce9bd authored by Michael McConville's avatar Michael McConville Committed by Michael Tokarev
Browse files

mmap(2) returns MAP_FAILED, not NULL, on failure


Signed-off-by: default avatarMichael McConville <mmcco@mykolab.com>
Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
parent 9aae6e54
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
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