aboutsummaryrefslogtreecommitdiff
path: root/nis/nss_nis/nis-spwd.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-spwd.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'nis/nss_nis/nis-spwd.c')
-rw-r--r--nis/nss_nis/nis-spwd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nis/nss_nis/nis-spwd.c b/nis/nss_nis/nis-spwd.c
index d024c0d..7cfc3ce 100644
--- a/nis/nss_nis/nis-spwd.c
+++ b/nis/nss_nis/nis-spwd.c
@@ -71,7 +71,7 @@ internal_nis_getspent_r (struct spwd *sp, char *buffer, size_t buflen,
int *errnop)
{
char *domain;
- if (__builtin_expect (yp_get_default_domain (&domain), 0))
+ if (__glibc_unlikely (yp_get_default_domain (&domain)))
return NSS_STATUS_UNAVAIL;
/* Get the next entry until we found a correct one. */
@@ -102,7 +102,7 @@ internal_nis_getspent_r (struct spwd *sp, char *buffer, size_t buflen,
? "passwd.adjunct.byname" : "shadow.byname"),
oldkey, oldkeylen, &outkey, &keylen, &result, &len);
- if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+ if (__glibc_unlikely (yperr != YPERR_SUCCESS))
{
enum nss_status retval = yperr2nss (yperr);
@@ -177,7 +177,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
const size_t name_len = strlen (name);
char *domain;
- if (__builtin_expect (yp_get_default_domain (&domain), 0))
+ if (__glibc_unlikely (yp_get_default_domain (&domain)))
return NSS_STATUS_UNAVAIL;
bool adjunct_used = false;
@@ -194,7 +194,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
adjunct_used = true;
}
- if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+ if (__glibc_unlikely (yperr != YPERR_SUCCESS))
{
enum nss_status retval = yperr2nss (yperr);
@@ -203,7 +203,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
return retval;
}
- if (__builtin_expect ((size_t) (len + (adjunct_used ? 3 : 1)) > buflen, 0))
+ if (__glibc_unlikely ((size_t) (len + (adjunct_used ? 3 : 1)) > buflen))
{
free (result);
*errnop = ERANGE;
@@ -224,7 +224,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
int parse_res = _nss_files_parse_spent (p, sp, (void *) buffer, buflen,
errnop);
- if (__builtin_expect (parse_res < 1, 0))
+ if (__glibc_unlikely (parse_res < 1))
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;