about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/fxstatat64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/fxstatat64.c')
-rw-r--r--sysdeps/unix/sysv/linux/fxstatat64.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index a55cf1d155..f4cd094eca 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -32,21 +32,17 @@ int
 __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
 {
   if (__glibc_unlikely (vers != _STAT_VER_LINUX))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
+    return INLINE_SYSCALL_ERROR_RETURN (-EINVAL, int, -1);
 
   int result;
   INTERNAL_SYSCALL_DECL (err);
 
   result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, st, flag);
-  if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-    return 0;
+  if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result, err)))
+    return INLINE_SYSCALL_ERROR_RETURN (-INTERNAL_SYSCALL_ERRNO (result,
+								 err),
+					int, -1);
   else
-    {
-      __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
-      return -1;
-    }
+    return 0;
 }
 libc_hidden_def (__fxstatat64)