about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/truncate64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/truncate64.c')
-rw-r--r--sysdeps/unix/sysv/linux/truncate64.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c
index 0a20547789..42b72731a9 100644
--- a/sysdeps/unix/sysv/linux/truncate64.c
+++ b/sysdeps/unix/sysv/linux/truncate64.c
@@ -41,8 +41,9 @@ truncate64 (path, length)
   if (! have_no_truncate64)
 #endif
     {
-      int result = INLINE_SYSCALL (truncate64, 3, path, length >> 32,
-				   length & 0xffffffff);
+      unsigned int low = length & 0xffffffff;
+      unsigned int high = length >> 32;
+      int result = INLINE_SYSCALL (truncate64, 3, path, low, high);
 
 #ifndef __ASSUME_TRUNCATE64_SYSCALL
       if (result != -1 || errno != ENOSYS)