aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorMichael McConville <mmcco@mykolab.com>2017-12-01 11:31:57 -0700
committerMichael Tokarev <mjt@tls.msk.ru>2017-12-18 17:07:02 +0300
commitab1ce9bd4897b9909836e2d50bca86f2f3f2dddc (patch)
treebff13625390f5282213df4c31f6cb7154143fa83 /hw/i386
parent9aae6e549d9a05f00315429097705a7beadd2aa4 (diff)
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>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/xen/xen-mapcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/xen/xen-mapcache.c b/hw/i386/xen/xen-mapcache.c
index baab93b614..efa35dc6e0 100644
--- a/hw/i386/xen/xen-mapcache.c
+++ b/hw/i386/xen/xen-mapcache.c
@@ -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);
}