about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mmap64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/mmap64.c')
-rw-r--r--sysdeps/unix/sysv/linux/mmap64.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 0b160b6f6b..4dbe28b9c4 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -46,15 +46,9 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
     }
 #endif
   if (offset & ((1 << page_shift) - 1))
-    {
-      __set_errno (EINVAL);
-      return MAP_FAILED;
-    }
-  void *result;
-  result = (void *)
-    INLINE_SYSCALL (mmap2, 6, addr,
-		    len, prot, flags, fd,
-		    (off_t) (offset >> page_shift));
-  return result;
+    return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, void *, MAP_FAILED);
+  return INLINE_SYSCALL_RETURN (mmap2, 6, void *, addr,
+				len, prot, flags, fd,
+				(off_t) (offset >> page_shift));
 }
 weak_alias (__mmap64, mmap64)