Use glibc_likely instead __builtin_expect.
[jlayton/glibc.git] / nis / nss_nis / nis-netgrp.c
index d4b2e569d3e46336aec0cc7984dd64acb81eb8de..d03d71593f56c9ecedeead09a58089ec66e07ffb 100644 (file)
@@ -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