about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /sysdeps/unix/sysv/linux/i386/get_clockfreq.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/get_clockfreq.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/get_clockfreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
index 9555c26580..024d4d0108 100644
--- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
@@ -40,7 +40,7 @@ __get_clockfreq (void)
     return result;
 
   fd = __open ("/proc/cpuinfo", O_RDONLY);
-  if (__builtin_expect (fd != -1, 1))
+  if (__glibc_likely (fd != -1))
     {
       /* XXX AFAIK the /proc filesystem can generate "files" only up
          to a size of 4096 bytes.  */
@@ -52,7 +52,7 @@ __get_clockfreq (void)
 	{
 	  char *mhz = memmem (buf, n, "cpu MHz", 7);
 
-	  if (__builtin_expect (mhz != NULL, 1))
+	  if (__glibc_likely (mhz != NULL))
 	    {
 	      char *endp = buf + n;
 	      int seen_decpoint = 0;