diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-14 19:22:44 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-01-14 19:22:44 +0000 |
commit | 9138bf01b3b21ce23cfdf15fce3f30bb9a1fbc61 (patch) | |
tree | fb0ac2208e1a080dfae3f2ca5f1f90f568bf4165 /libc/sysdeps/linux/common/mmap64.c | |
parent | 6e3c1938ff129fb5385a963ec600111aa6228bdc (diff) | |
download | uClibc-alpine-9138bf01b3b21ce23cfdf15fce3f30bb9a1fbc61.tar.bz2 uClibc-alpine-9138bf01b3b21ce23cfdf15fce3f30bb9a1fbc61.tar.xz |
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/common/mmap64.c')
-rw-r--r-- | libc/sysdeps/linux/common/mmap64.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c index 804d6af50..f0380b1ad 100644 --- a/libc/sysdeps/linux/common/mmap64.c +++ b/libc/sysdeps/linux/common/mmap64.c @@ -55,13 +55,12 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset) { - if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len)) - { - __set_errno (EINVAL); - return MAP_FAILED; - } + if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len)) { + __set_errno (EINVAL); + return MAP_FAILED; + } - return mmap (addr, len, prot, flags, fd, (off_t) offset); + return mmap (addr, len, prot, flags, fd, (off_t) offset); } #else @@ -77,11 +76,11 @@ static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset) { - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) { - __set_errno (EINVAL); - return MAP_FAILED; - } - return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT))); + if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) { + __set_errno (EINVAL); + return MAP_FAILED; + } + return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT))); } #endif |