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_callback.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nis/nis_callback.c')
-rw-r--r-- | nis/nis_callback.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nis/nis_callback.c b/nis/nis_callback.c index 958c49f122..e3527339a7 100644 --- a/nis/nis_callback.c +++ b/nis/nis_callback.c @@ -271,18 +271,18 @@ __nis_create_callback (int (*callback) (const_nis_name, const nis_object *, cb = (struct nis_cb *) calloc (1, sizeof (struct nis_cb) + sizeof (nis_server)); - if (__builtin_expect (cb == NULL, 0)) + if (__glibc_unlikely (cb == NULL)) goto failed; cb->serv = (nis_server *) (cb + 1); cb->serv->name = strdup (nis_local_principal ()); - if (__builtin_expect (cb->serv->name == NULL, 0)) + if (__glibc_unlikely (cb->serv->name == NULL)) goto failed; cb->serv->ep.ep_val = (endpoint *) calloc (2, sizeof (endpoint)); - if (__builtin_expect (cb->serv->ep.ep_val == NULL, 0)) + if (__glibc_unlikely (cb->serv->ep.ep_val == NULL)) goto failed; cb->serv->ep.ep_len = 1; cb->serv->ep.ep_val[0].family = strdup ("inet"); - if (__builtin_expect (cb->serv->ep.ep_val[0].family == NULL, 0)) + if (__glibc_unlikely (cb->serv->ep.ep_val[0].family == NULL)) goto failed; cb->callback = callback; cb->userdata = userdata; @@ -314,7 +314,7 @@ __nis_create_callback (int (*callback) (const_nis_name, const nis_object *, } cb->serv->ep.ep_val[0].proto = strdup ((flags & USE_DGRAM) ? "udp" : "tcp"); - if (__builtin_expect (cb->serv->ep.ep_val[0].proto == NULL, 0)) + if (__glibc_unlikely (cb->serv->ep.ep_val[0].proto == NULL)) goto failed; cb->xprt = ((flags & USE_DGRAM) ? svcudp_bufcreate (sock, 100, 8192) |