Message ID | 1452502867-12148-2-git-send-email-chengang@emindsoft.com.cn |
---|---|
State | New |
Headers | show |
diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 7807ed0..51c381d 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -158,10 +158,10 @@ static int mmap_frag(abi_ulong real_start, if (prot1 == 0) { /* no page was there, so we allocate one */ - void *p = mmap(host_start, qemu_host_page_size, prot, - flags | MAP_ANONYMOUS, -1, 0); - if (p == MAP_FAILED) + if (mmap(host_start, qemu_host_page_size, prot, flags | MAP_ANONYMOUS, + -1, 0) == MAP_FAILED) { return -1; + } page_set_flags(real_start, real_start + qemu_host_page_size, PAGE_VALID); prot1 = prot;