diff mbox

[17/17] mmap_frag() users only check for -1 error

Message ID 35f044d197243a3a5e6a2dc4c90963afef54595c.1263944807.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Jan. 19, 2010, 11:56 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 linux-user/mmap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index c1c7e48..25fc0b2 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -243,7 +243,7 @@  static int mmap_frag(abi_ulong real_start,
            possible while it is a shared mapping */
         if ((flags & MAP_TYPE) == MAP_SHARED &&
             (prot & PROT_WRITE))
-            return -EINVAL;
+            return -1;

         /* adjust protection to be able to read */
         if (!(prot1 & PROT_WRITE))