{
struct search_t *req = (struct search_t *) indata;
- if (__builtin_expect (instatus != YP_TRUE, 0))
+ if (__glibc_unlikely (instatus != YP_TRUE))
return 1;
if (inkey && inkeylen > 0 && inval && invallen > 0)
{
- if (__builtin_expect ((size_t) (invallen + 1) > req->buflen, 0))
+ if (__glibc_unlikely ((size_t) (invallen + 1) > req->buflen))
{
*req->errnop = ERANGE;
req->status = NSS_STATUS_TRYAGAIN;
{
struct response_t *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;
++intern.offset;
size_t len = strlen (p) + 1;
- if (__builtin_expect (len > buflen, 0))
+ if (__glibc_unlikely (len > buflen))
{
*errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
p = memcpy (buffer, &bucket->mem[intern.offset], len);
parse_res = _nss_files_parse_servent (p, serv, pdata, buflen, errnop);
- if (__builtin_expect (parse_res == -1, 0))
+ if (__glibc_unlikely (parse_res == -1))
return NSS_STATUS_TRYAGAIN;
intern.offset += len;
}
char *domain;
- if (__builtin_expect (yp_get_default_domain (&domain), 0))
+ if (__glibc_unlikely (yp_get_default_domain (&domain)))
return NSS_STATUS_UNAVAIL;
/* If the protocol is given, we could try if our NIS server knows
/* If we found the key, it's ok and parse the result. If not,
fall through and parse the complete table. */
- if (__builtin_expect (status == YPERR_SUCCESS, 1))
+ if (__glibc_likely (status == YPERR_SUCCESS))
{
- if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
+ if (__glibc_unlikely ((size_t) (len + 1) > buflen))
{
free (result);
*errnop = ERANGE;
int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer,
buflen, errnop);
- if (__builtin_expect (parse_res < 0, 0))
+ if (__glibc_unlikely (parse_res < 0))
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
req.status = NSS_STATUS_NOTFOUND;
status = yp_all (domain, "services.byname", &ypcb);
- if (__builtin_expect (status != YPERR_SUCCESS, 0))
+ if (__glibc_unlikely (status != YPERR_SUCCESS))
return yperr2nss (status);
return req.status;
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;
/* If the protocol is given, we only need one query.
/* If we found the key, it's ok and parse the result. If not,
fall through and parse the complete table. */
- if (__builtin_expect (status == YPERR_SUCCESS, 1))
+ if (__glibc_likely (status == YPERR_SUCCESS))
{
- if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
+ if (__glibc_unlikely ((size_t) (len + 1) > buflen))
{
free (result);
*errnop = ERANGE;
free (result);
int parse_res = _nss_files_parse_servent (p, serv, (void *) buffer,
buflen, errnop);
- if (__builtin_expect (parse_res < 0, 0))
+ if (__glibc_unlikely (parse_res < 0))
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
req.status = NSS_STATUS_NOTFOUND;
int status = yp_all (domain, "services.byname", &ypcb);
- if (__builtin_expect (status != YPERR_SUCCESS, 0))
+ if (__glibc_unlikely (status != YPERR_SUCCESS))
return yperr2nss (status);
return req.status;