aboutsummaryrefslogtreecommitdiff
path: root/intl/bindtextdom.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 /intl/bindtextdom.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'intl/bindtextdom.c')
-rw-r--r--intl/bindtextdom.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
index 20c37b2..c362496 100644
--- a/intl/bindtextdom.c
+++ b/intl/bindtextdom.c
@@ -158,12 +158,12 @@ set_binding_values (domainname, dirnamep, codesetp)
#else
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
+ if (__glibc_likely (result != NULL))
memcpy (result, dirname, len);
#endif
}
- if (__builtin_expect (result != NULL, 1))
+ if (__glibc_likely (result != NULL))
{
if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
@@ -196,11 +196,11 @@ set_binding_values (domainname, dirnamep, codesetp)
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
+ if (__glibc_likely (result != NULL))
memcpy (result, codeset, len);
#endif
- if (__builtin_expect (result != NULL, 1))
+ if (__glibc_likely (result != NULL))
{
free (binding->codeset);
@@ -228,7 +228,7 @@ set_binding_values (domainname, dirnamep, codesetp)
struct binding *new_binding =
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
- if (__builtin_expect (new_binding == NULL, 0))
+ if (__glibc_unlikely (new_binding == NULL))
goto failed;
memcpy (new_binding->domainname, domainname, len);
@@ -249,12 +249,12 @@ set_binding_values (domainname, dirnamep, codesetp)
char *result;
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (dirname);
- if (__builtin_expect (result == NULL, 0))
+ if (__glibc_unlikely (result == NULL))
goto failed_dirname;
#else
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
+ if (__glibc_unlikely (result == NULL))
goto failed_dirname;
memcpy (result, dirname, len);
#endif
@@ -278,12 +278,12 @@ set_binding_values (domainname, dirnamep, codesetp)
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (codeset);
- if (__builtin_expect (result == NULL, 0))
+ if (__glibc_unlikely (result == NULL))
goto failed_codeset;
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
+ if (__glibc_unlikely (result == NULL))
goto failed_codeset;
memcpy (result, codeset, len);
#endif