about summary refs log tree commit diff
path: root/nscd/nscd_getgr_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd_getgr_r.c')
-rw-r--r--nscd/nscd_getgr_r.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c
index ed5dc11159..d9b91a470f 100644
--- a/nscd/nscd_getgr_r.c
+++ b/nscd/nscd_getgr_r.c
@@ -143,7 +143,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
   /* No value found so far.  */
   *result = NULL;
 
-  if (__builtin_expect (gr_resp.found == -1, 0))
+  if (__glibc_unlikely (gr_resp.found == -1))
     {
       /* The daemon does not cache this database.  */
       __nss_not_use_nscd_group = 1;
@@ -164,7 +164,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
 	       & (__alignof__ (char *) - 1));
       total_len = (align + (1 + gr_resp.gr_mem_cnt) * sizeof (char *)
 		   + gr_resp.gr_name_len + gr_resp.gr_passwd_len);
-      if (__builtin_expect (buflen < total_len, 0))
+      if (__glibc_unlikely (buflen < total_len))
 	{
 	no_room:
 	  __set_errno (ERANGE);
@@ -190,7 +190,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
       if (gr_name == NULL)
 	{
 	  /* Handle a simple, usual case: no group members.  */
-	  if (__builtin_expect (gr_resp.gr_mem_cnt == 0, 1))
+	  if (__glibc_likely (gr_resp.gr_mem_cnt == 0))
 	    {
 	      size_t n = gr_resp.gr_name_len + gr_resp.gr_passwd_len;
 	      if (__builtin_expect (__readall (sock, resultbuf->gr_name, n)
@@ -217,7 +217,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
 
 	      /* Get this data.  */
 	      size_t n = __readvall (sock, vec, 2);
-	      if (__builtin_expect (n != total_len, 0))
+	      if (__glibc_unlikely (n != total_len))
 		goto out_close;
 	    }
 	}
@@ -239,7 +239,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
 	  p += len[cnt];
 	}
 
-      if (__builtin_expect (gr_name + gr_name_len + total_len > recend, 0))
+      if (__glibc_unlikely (gr_name + gr_name_len + total_len > recend))
 	{
 	  /* len array might contain garbage during nscd GC cycle,
 	     retry rather than fail in that case.  */
@@ -247,7 +247,7 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type,
 	    retval = -2;
 	  goto out_close;
 	}
-      if (__builtin_expect (total_len > buflen, 0))
+      if (__glibc_unlikely (total_len > buflen))
 	{
 	  /* len array might contain garbage during nscd GC cycle,
 	     retry rather than fail in that case.  */