about summary refs log tree commit diff
path: root/locale/loadarchive.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 /locale/loadarchive.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'locale/loadarchive.c')
-rw-r--r--locale/loadarchive.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index e14535e7c0..22ac90d139 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -263,7 +263,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
     }
 
   /* If there is no archive or it cannot be loaded for some reason fail.  */
-  if (__builtin_expect (headmap.ptr == NULL, 0))
+  if (__glibc_unlikely (headmap.ptr == NULL))
     goto close_and_out;
 
   /* We have the archive available.  To find the name we first have to
@@ -459,11 +459,11 @@ _nl_load_locale_from_archive (int category, const char **namep)
      Now we need the expected data structures to point into the data.  */
 
   lia = malloc (sizeof *lia);
-  if (__builtin_expect (lia == NULL, 0))
+  if (__glibc_unlikely (lia == NULL))
     return NULL;
 
   lia->name = strdup (*namep);
-  if (__builtin_expect (lia->name == NULL, 0))
+  if (__glibc_unlikely (lia->name == NULL))
     {
       free (lia);
       return NULL;
@@ -478,7 +478,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
 	lia->data[cnt] = _nl_intern_locale_data (cnt,
 						 results[cnt].addr,
 						 results[cnt].len);
-	if (__builtin_expect (lia->data[cnt] != NULL, 1))
+	if (__glibc_likely (lia->data[cnt] != NULL))
 	  {
 	    /* _nl_intern_locale_data leaves us these fields to initialize.  */
 	    lia->data[cnt]->alloc = ld_archive;