diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /nis/nis_subr.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nis/nis_subr.c')
-rw-r--r-- | nis/nis_subr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c index 4a4580a..8f6f1d7 100644 --- a/nis/nis_subr.c +++ b/nis/nis_subr.c @@ -38,7 +38,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen) while (name[i] != '.' && name[i] != '\0') i++; - if (__builtin_expect (i >= buflen, 0)) + if (__glibc_unlikely (i >= buflen)) { __set_errno (ERANGE); return NULL; @@ -118,7 +118,7 @@ nis_getnames (const_nis_name name) int count = 2; nis_name *getnames = malloc ((count + 1) * sizeof (char *)); - if (__builtin_expect (getnames == NULL, 0)) + if (__glibc_unlikely (getnames == NULL)) return NULL; /* Do we have a fully qualified NIS+ name ? If yes, give it back */ @@ -200,12 +200,12 @@ nis_getnames (const_nis_name name) count += 5; nis_name *newp = realloc (getnames, (count + 1) * sizeof (char *)); - if (__builtin_expect (newp == NULL, 0)) + if (__glibc_unlikely (newp == NULL)) goto free_null; getnames = newp; } tmp = malloc (strlen (cptr) + local_domain_len + name_len + 2); - if (__builtin_expect (tmp == NULL, 0)) + if (__glibc_unlikely (tmp == NULL)) goto free_null; getnames[pos] = tmp; @@ -235,7 +235,7 @@ nis_getnames (const_nis_name name) char *p; tmp = malloc (cplen + local_domain_len + name_len + 2); - if (__builtin_expect (tmp == NULL, 0)) + if (__glibc_unlikely (tmp == NULL)) goto free_null; p = __stpcpy (tmp, name); @@ -251,7 +251,7 @@ nis_getnames (const_nis_name name) char *p; tmp = malloc (cplen + name_len + 3); - if (__builtin_expect (tmp == NULL, 0)) + if (__glibc_unlikely (tmp == NULL)) goto free_null; p = __mempcpy (tmp, name, name_len); @@ -267,7 +267,7 @@ nis_getnames (const_nis_name name) count += 5; nis_name *newp = realloc (getnames, (count + 1) * sizeof (char *)); - if (__builtin_expect (newp == NULL, 0)) + if (__glibc_unlikely (newp == NULL)) goto free_null; getnames = newp; } |