[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
- [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), chengang, 2016/01/11
- [Qemu-devel] [PATCH v2 2/3] linux-user/mmap.c: Remove useless variable p for mmap_frag,
chengang <=
- [Qemu-devel] [PATCH v2 3/3] linux-user/mmap.c: Use TARGET_PAGE_SIZE as the increasing step, chengang, 2016/01/11
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Peter Maydell, 2016/01/25
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Chen Gang, 2016/01/25
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Peter Maydell, 2016/01/26
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Chen Gang, 2016/01/26
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Peter Maydell, 2016/01/26
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Chen Gang, 2016/01/26
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Peter Maydell, 2016/01/28
- Re: [Qemu-devel] [PATCH v2 1/3] linux-user/mmap.c: Set prot page flags for the correct region in mmap_frag(), Chen Gang, 2016/01/28