From a1ffb40e32741f992c743e7b16c061fefa3747ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20B=C3=ADlka?= Date: Mon, 10 Feb 2014 14:45:42 +0100 Subject: Use glibc_likely instead __builtin_expect. --- nis/nis_table.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'nis/nis_table.c') 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) -- cgit v1.2.3