From 6f3f843335004fa71719a474f2a7c4916bd949dc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 1 Apr 2013 05:09:17 -0400 Subject: linux: use OFF64_HI_LO rather than __LONG_LONG_PAIR This macro takes care of the shift/mask split for us, so no need to open code this ourselves and then use __LONG_LONG_PAIR. Signed-off-by: Mike Frysinger --- libc/sysdeps/linux/common/truncate64.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'libc/sysdeps/linux/common/truncate64.c') diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c index e2868be15..159c794f5 100644 --- a/libc/sysdeps/linux/common/truncate64.c +++ b/libc/sysdeps/linux/common/truncate64.c @@ -7,7 +7,7 @@ * and on 32 bit machines this sends things into the kernel as * two 32-bit arguments (high and low 32 bits of length) that * are ordered based on endianess. It turns out endian.h has - * just the macro we need to order things, __LONG_LONG_PAIR. + * just the macro we need to order things, OFF64_HI_LO. */ #include <_lfs_64.h> @@ -24,14 +24,10 @@ _syscall2(int, truncate64, const char *, path, __off64_t, length) # include int truncate64(const char * path, __off64_t length) { - uint32_t low = length & 0xffffffff; - uint32_t high = length >> 32; # if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) - return INLINE_SYSCALL(truncate64, 4, path, 0, - __LONG_LONG_PAIR(high, low)); + return INLINE_SYSCALL(truncate64, 4, path, 0, OFF64_HI_LO(length)); # else - return INLINE_SYSCALL(truncate64, 3, path, - __LONG_LONG_PAIR(high, low)); + return INLINE_SYSCALL(truncate64, 3, path, OFF64_HI_LO(length)); # endif } # else -- cgit v1.2.3