]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/opendir.c
Use glibc_likely instead __builtin_expect.
[thirdparty/glibc.git] / sysdeps / posix / opendir.c
index e366701bd4d0f728870f3621eca93e81ff5dd94f..2740b3ac29ffffb26b282d8ba40b109be4747534 100644 (file)
@@ -110,7 +110,7 @@ __opendirat (int dfd, const char *name)
         performed on, say, a tape device might have undesirable effects.  */
       if (__builtin_expect (__xstat64 (_STAT_VER, name, &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;
@@ -139,7 +139,7 @@ __opendirat (int dfd, const char *name)
         the `stat' call.  */
       if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &statbuf), 0) < 0)
        goto lose;
-      if (__builtin_expect (! S_ISDIR (statbuf.st_mode), 0))
+      if (__glibc_unlikely (! S_ISDIR (statbuf.st_mode)))
        {
          __set_errno (ENOTDIR);
        lose: