diff options
Diffstat (limited to 'sysdeps/posix/fdopendir.c')
-rw-r--r-- | sysdeps/posix/fdopendir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/posix/fdopendir.c b/sysdeps/posix/fdopendir.c index d8c6ec0513..4071996dcd 100644 --- a/sysdeps/posix/fdopendir.c +++ b/sysdeps/posix/fdopendir.c @@ -31,7 +31,7 @@ __fdopendir (int fd) if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0) return NULL; - if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0)) + if (__glibc_unlikely (! S_ISDIR (statbuf.st_mode))) { __set_errno (ENOTDIR); return NULL; @@ -39,9 +39,9 @@ __fdopendir (int fd) /* Make sure the descriptor allows for reading. */ int flags = __fcntl (fd, F_GETFL); - if (__builtin_expect (flags == -1, 0)) + if (__glibc_unlikely (flags == -1)) return NULL; - if (__builtin_expect ((flags & O_ACCMODE) == O_WRONLY, 0)) + if (__glibc_unlikely ((flags & O_ACCMODE) == O_WRONLY)) { __set_errno (EINVAL); return NULL; |