]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
allocalim.h: use __glibc_likely instead of __builtin_expect
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 30 Jan 2018 20:42:21 +0000 (21:42 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 30 Jan 2018 20:42:21 +0000 (21:42 +0100)
* sysdeps/pthread/allocalim.h (__libc_use_alloca): Use __glibc_likely
instead of __builtin_expect.

ChangeLog
sysdeps/pthread/allocalim.h

index 3c4868434c2545087fd4dd2b7fc7dfc677c190ff..06250f90075e22e982933caf724987a160ad1889 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-30  Samuel Thibault  <samuel.thibault@ens-lyon.org
+
+       * sysdeps/pthread/allocalim.h (__libc_use_alloca): Use __glibc_likely
+       instead of __builtin_expect.
+
 2018-01-30  Florian Weimer  <fweimer@redhat.com>
 
        * nss/bug17079.c (do_test): Use nss_files only for reading passwd
index 38faf57b70a38e425426042ec40519eebf6652ee..99f74838dde55f4f56956d923edbe5460a6b2b63 100644 (file)
@@ -24,9 +24,9 @@ extern __always_inline
 int
 __libc_use_alloca (size_t size)
 {
-  return (__builtin_expect (__libc_alloca_cutoff (size), 1)
+  return (__glibc_likely (__libc_alloca_cutoff (size))
 #ifdef PTHREAD_STACK_MIN
-          || __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
+          || __glibc_likely (size <= PTHREAD_STACK_MIN / 4)
 #endif
          );
 }