about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/fchownat.c5
-rw-r--r--sysdeps/unix/sysv/linux/fxstatat64.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/fxstatat.c7
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c5
4 files changed, 14 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/fchownat.c b/sysdeps/unix/sysv/linux/fchownat.c
index d3cb992a09..d776c65a1f 100644
--- a/sysdeps/unix/sysv/linux/fchownat.c
+++ b/sysdeps/unix/sysv/linux/fchownat.c
@@ -67,7 +67,10 @@ fchownat (fd, file, owner, group, flag)
     result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group);
 
   if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
-    __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+    {
+      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+      result = -1;
+    }
 
   return result;
 }
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index 8c41db710c..2360f50d98 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -128,8 +128,8 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
     return __xstat64_conv (vers, &kst, st);
 
  fail:
+#endif
   __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
 
   return -1;
-#endif
 }
diff --git a/sysdeps/unix/sysv/linux/i386/fxstatat.c b/sysdeps/unix/sysv/linux/i386/fxstatat.c
index 2fc89e69c4..23fd29c9a3 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstatat.c
@@ -47,7 +47,7 @@ extern int __have_no_stat64;
 int
 __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
 {
-  if (flag & ~AT_SYMLINK_NOFOLLOW)
+  if (__builtin_expect (flag & ~AT_SYMLINK_NOFOLLOW, 0))
     {
       __set_errno (EINVAL);
       return -1;
@@ -138,7 +138,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
 
  out:
   if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
-    __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+    {
+      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+      result = -1;
+    }
 
   return result;
 }
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
index 70e73571f7..d88b10e947 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c
@@ -70,7 +70,10 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
     res = INTERNAL_SYSCALL (stat, err, 2, file, CHECK_1 (st));
 
   if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (res, err), 0))
-    __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (res, err), fd, buf);
+    {
+      __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (res, err), fd, buf);
+      res = -1;
+    }
 
   return res;
 }