summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/fstatat64.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/fstatat64.c')
-rw-r--r--libc/sysdeps/linux/common/fstatat64.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/fstatat64.c b/libc/sysdeps/linux/common/fstatat64.c
index 836ed4114..fdd17a0b7 100644
--- a/libc/sysdeps/linux/common/fstatat64.c
+++ b/libc/sysdeps/linux/common/fstatat64.c
@@ -56,12 +56,10 @@ int fstatat64(int fd, const char *file, struct stat64 *buf, int flag)
int r = INLINE_SYSCALL(statx, 5, fd, file, AT_NO_AUTOMOUNT | flag,
STATX_BASIC_STATS, &tmp);
- if (r != 0)
- return r;
+ if (r == 0)
+ __cp_stat64_statx ((struct stat *)buf, &tmp);
- __cp_stat_statx ((struct stat *)buf, &tmp);
-
- return 0;
+ return r;
}
libc_hidden_def(fstatat64)
#endif