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_table.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_table.c')
-rw-r--r-- | nis/nis_table.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nis/nis_table.c b/nis/nis_table.c index 9344a1f7b3..bb74873d9d 100644 --- a/nis/nis_table.c +++ b/nis/nis_table.c @@ -92,7 +92,7 @@ __create_ib_request (const_nis_name name, unsigned int flags) if (cptr != NULL) *cptr++ = '\0'; - if (__builtin_expect (val == NULL, 0)) + if (__glibc_unlikely (val == NULL)) { nis_free_request (ibreq); return NULL; @@ -282,7 +282,7 @@ nis_list (const_nis_name name, unsigned int flags, } while (__nisbind_connect (&bptr) != NIS_SUCCESS) - if (__builtin_expect (__nisbind_next (&bptr) != NIS_SUCCESS, 0)) + if (__glibc_unlikely (__nisbind_next (&bptr) != NIS_SUCCESS)) { NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; goto fail; @@ -302,7 +302,7 @@ nis_list (const_nis_name name, unsigned int flags, (xdrproc_t) _xdr_nis_result, (caddr_t) res, RPCTIMEOUT); - if (__builtin_expect (clnt_status != RPC_SUCCESS, 0)) + if (__glibc_unlikely (clnt_status != RPC_SUCCESS)) NIS_RES_STATUS (res) = NIS_RPCERROR; else switch (NIS_RES_STATUS (res)) @@ -316,7 +316,7 @@ nis_list (const_nis_name name, unsigned int flags, free (ibreq->ibr_name); ibreq->ibr_name = NULL; /* If we hit the link limit, bail. */ - if (__builtin_expect (count_links > NIS_MAXLINKS, 0)) + if (__glibc_unlikely (count_links > NIS_MAXLINKS)) { NIS_RES_STATUS (res) = NIS_LINKNAMEERROR; ++done; @@ -491,7 +491,7 @@ nis_list (const_nis_name name, unsigned int flags, /* Try the next domainname if we don't follow a link. */ free (ibreq->ibr_name); ibreq->ibr_name = NULL; - if (__builtin_expect (count_links, 0)) + if (__glibc_unlikely (count_links)) { NIS_RES_STATUS (res) = NIS_LINKNAMEERROR; ++done; @@ -597,7 +597,7 @@ nis_add_entry (const_nis_name name, const nis_object *obj2, unsigned int flags) (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (__builtin_expect (status != NIS_SUCCESS, 0)) + if (__glibc_unlikely (status != NIS_SUCCESS)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -654,7 +654,7 @@ nis_modify_entry (const_nis_name name, const nis_object *obj2, (xdrproc_t) _xdr_ib_request, (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (__builtin_expect (status != NIS_SUCCESS, 0)) + if (__glibc_unlikely (status != NIS_SUCCESS)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -739,7 +739,7 @@ nis_first_entry (const_nis_name name) (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (__builtin_expect (status != NIS_SUCCESS, 0)) + if (__glibc_unlikely (status != NIS_SUCCESS)) NIS_RES_STATUS (res) = status; nis_free_request (ibreq); @@ -782,7 +782,7 @@ nis_next_entry (const_nis_name name, const netobj *cookie) (caddr_t) ibreq, (xdrproc_t) _xdr_nis_result, (caddr_t) res, 0, NULL); - if (__builtin_expect (status != NIS_SUCCESS, 0)) + if (__glibc_unlikely (status != NIS_SUCCESS)) NIS_RES_STATUS (res) = status; if (cookie != NULL) |