summaryrefslogtreecommitdiff
path: root/nis/nss_nis/nis-netgrp.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /nis/nss_nis/nis-netgrp.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nis/nss_nis/nis-netgrp.c')
-rw-r--r--nis/nss_nis/nis-netgrp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nis/nss_nis/nis-netgrp.c b/nis/nss_nis/nis-netgrp.c
index d4b2e569d3..d03d71593f 100644
--- a/nis/nss_nis/nis-netgrp.c
+++ b/nis/nss_nis/nis-netgrp.c
@@ -54,16 +54,16 @@ _nss_nis_setnetgrent (const char *group, struct __netgrent *netgrp)
status = NSS_STATUS_SUCCESS;
- if (__builtin_expect (group == NULL || group[0] == '\0', 0))
+ if (__glibc_unlikely (group == NULL || group[0] == '\0'))
return NSS_STATUS_UNAVAIL;
char *domain;
- if (__builtin_expect (yp_get_default_domain (&domain), 0))
+ if (__glibc_unlikely (yp_get_default_domain (&domain)))
return NSS_STATUS_UNAVAIL;
status = yperr2nss (yp_match (domain, "netgroup", group, strlen (group),
&netgrp->data, &len));
- if (__builtin_expect (status == NSS_STATUS_SUCCESS, 1))
+ if (__glibc_likely (status == NSS_STATUS_SUCCESS))
{
/* Our implementation of yp_match already allocates a buffer
which is one byte larger than the value in LEN specifies