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_getservlist.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nis/nis_getservlist.c')
-rw-r--r-- | nis/nis_getservlist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nis/nis_getservlist.c b/nis/nis_getservlist.c index ac9278e227..f180bad0dd 100644 --- a/nis/nis_getservlist.c +++ b/nis/nis_getservlist.c @@ -38,7 +38,7 @@ nis_getservlist (const_nis_name dir) serv = malloc (sizeof (nis_server *) * (NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_len + 1)); - if (__builtin_expect (serv == NULL, 0)) + if (__glibc_unlikely (serv == NULL)) { nis_freeresult (res); return NULL; @@ -50,7 +50,7 @@ nis_getservlist (const_nis_name dir) server = &NIS_RES_OBJECT (res)->DI_data.do_servers.do_servers_val[i]; serv[i] = calloc (1, sizeof (nis_server)); - if (__builtin_expect (serv[i] == NULL, 0)) + if (__glibc_unlikely (serv[i] == NULL)) { free_all: while (i-- > 0) @@ -81,7 +81,7 @@ nis_getservlist (const_nis_name dir) if (server->name != NULL) { serv[i]->name = strdup (server->name); - if (__builtin_expect (serv[i]->name == NULL, 0)) + if (__glibc_unlikely (serv[i]->name == NULL)) { ++i; goto free_all; @@ -95,7 +95,7 @@ nis_getservlist (const_nis_name dir) serv[i]->ep.ep_val = malloc (server->ep.ep_len * sizeof (endpoint)); - if (__builtin_expect (serv[i]->ep.ep_val == NULL, 0)) + if (__glibc_unlikely (serv[i]->ep.ep_val == NULL)) { ++i; goto free_all; @@ -126,7 +126,7 @@ nis_getservlist (const_nis_name dir) if (server->pkey.n_len > 0) { serv[i]->pkey.n_bytes = malloc (server->pkey.n_len); - if (__builtin_expect (serv[i]->pkey.n_bytes == NULL, 0)) + if (__glibc_unlikely (serv[i]->pkey.n_bytes == NULL)) { ++i; goto free_all; @@ -140,7 +140,7 @@ nis_getservlist (const_nis_name dir) else { serv = malloc (sizeof (nis_server *)); - if (__builtin_expect (serv != NULL, 0)) + if (__glibc_unlikely (serv != NULL)) serv[0] = NULL; } |