From a1ffb40e32741f992c743e7b16c061fefa3747ac Mon Sep 17 00:00:00 2001 From: Ondřej Bílka Date: Mon, 10 Feb 2014 14:45:42 +0100 Subject: Use glibc_likely instead __builtin_expect. --- locale/loadarchive.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'locale/loadarchive.c') 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; -- cgit 1.4.1