diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-11-16 00:36:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-11-16 00:36:16 +0000 |
commit | baf532c12785a7c85493d6b6b2345f509b1d6389 (patch) | |
tree | 46583b8da85d66706dedf85f3ce47b819f4bf8c4 /sysdeps/unix/sysv/linux/i386/fxstatat.c | |
parent | 7761a3ac532d50d500bafc073e02ce17b52be377 (diff) | |
download | glibc-baf532c12785a7c85493d6b6b2345f509b1d6389.tar.gz glibc-baf532c12785a7c85493d6b6b2345f509b1d6389.tar.xz glibc-baf532c12785a7c85493d6b6b2345f509b1d6389.zip |
* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c (__fxstatat):
Return -1 on failure. * sysdeps/unix/sysv/linux/fchownat.c (fchownat): Likewise. * sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat): Likewise.. * sysdeps/unix/sysv/linux/fxstatat64.c [__ASSUME_STAT64_SYSCALL] (__fxstatat64): Handle errors.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/fxstatat.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/fxstatat.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |