qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 2/3] linux-user/mmap.c: Remove useless variable p


From: chengang
Subject: [Qemu-devel] [PATCH v2 2/3] linux-user/mmap.c: Remove useless variable p for mmap_frag
Date: Mon, 11 Jan 2016 17:01:06 +0800

From: Chen Gang <address@hidden>

It is useless.

Signed-off-by: Chen Gang <address@hidden>
---
 linux-user/mmap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]