diff options
Diffstat (limited to 'nis/nss_nis/nis-grp.c')
-rw-r--r-- | nis/nss_nis/nis-grp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c index 53368073a7..20211de0de 100644 --- a/nis/nss_nis/nis-grp.c +++ b/nis/nss_nis/nis-grp.c @@ -85,7 +85,7 @@ internal_nis_setgrent (void) { /* We have to read all the data now. */ char *domain; - if (__builtin_expect (yp_get_default_domain (&domain), 0)) + if (__glibc_unlikely (yp_get_default_domain (&domain))) return NSS_STATUS_UNAVAIL; struct ypall_callback ypcb; @@ -152,7 +152,7 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, handle_batch_read: bucket = intern.next; - if (__builtin_expect (intern.offset >= bucket->size, 0)) + if (__glibc_unlikely (intern.offset >= bucket->size)) { if (bucket->next == NULL) return NSS_STATUS_NOTFOUND; @@ -191,7 +191,7 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, yperr = yp_next (domain, "group.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); @@ -201,7 +201,7 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, } } - if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) + if (__glibc_unlikely ((size_t) (len + 1) > buflen)) { if (!batch_read) free (result); @@ -218,7 +218,7 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen, parse_res = _nss_files_parse_grent (p, grp, (void *) buffer, buflen, errnop); - if (__builtin_expect (parse_res == -1, 0)) + if (__glibc_unlikely (parse_res == -1)) { if (!batch_read) free (outkey); @@ -267,7 +267,7 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp, } char *domain; - if (__builtin_expect (yp_get_default_domain (&domain), 0)) + if (__glibc_unlikely (yp_get_default_domain (&domain))) return NSS_STATUS_UNAVAIL; char *result; @@ -275,7 +275,7 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp, int yperr = yp_match (domain, "group.byname", name, strlen (name), &result, &len); - if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) + if (__glibc_unlikely (yperr != YPERR_SUCCESS)) { enum nss_status retval = yperr2nss (yperr); @@ -284,7 +284,7 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp, return retval; } - if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) + if (__glibc_unlikely ((size_t) (len + 1) > buflen)) { free (result); *errnop = ERANGE; @@ -314,7 +314,7 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp, 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; char buf[32]; @@ -324,7 +324,7 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp, int len; int yperr = yp_match (domain, "group.bygid", buf, nlen, &result, &len); - if (__builtin_expect (yperr != YPERR_SUCCESS, 0)) + if (__glibc_unlikely (yperr != YPERR_SUCCESS)) { enum nss_status retval = yperr2nss (yperr); @@ -333,7 +333,7 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp, return retval; } - if (__builtin_expect ((size_t) (len + 1) > buflen, 0)) + if (__glibc_unlikely ((size_t) (len + 1) > buflen)) { free (result); *errnop = ERANGE; @@ -348,7 +348,7 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp, int parse_res = _nss_files_parse_grent (p, grp, (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; |