about summary refs log tree commit diff
path: root/nis/nis_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_subr.c')
-rw-r--r--nis/nis_subr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/nis/nis_subr.c b/nis/nis_subr.c
index 4a4580a1e6..8f6f1d71f3 100644
--- a/nis/nis_subr.c
+++ b/nis/nis_subr.c
@@ -38,7 +38,7 @@ nis_leaf_of_r (const_nis_name name, char *buffer, size_t buflen)
   while (name[i] != '.' && name[i] != '\0')
     i++;
 
-  if (__builtin_expect (i >= buflen, 0))
+  if (__glibc_unlikely (i >= buflen))
     {
       __set_errno (ERANGE);
       return NULL;
@@ -118,7 +118,7 @@ nis_getnames (const_nis_name name)
 
   int count = 2;
   nis_name *getnames = malloc ((count + 1) * sizeof (char *));
-  if (__builtin_expect (getnames == NULL, 0))
+  if (__glibc_unlikely (getnames == NULL))
       return NULL;
 
   /* Do we have a fully qualified NIS+ name ? If yes, give it back */
@@ -200,12 +200,12 @@ nis_getnames (const_nis_name name)
 		  count += 5;
 		  nis_name *newp = realloc (getnames,
 					    (count + 1) * sizeof (char *));
-		  if (__builtin_expect (newp == NULL, 0))
+		  if (__glibc_unlikely (newp == NULL))
 		    goto free_null;
 		  getnames = newp;
 		}
 	      tmp = malloc (strlen (cptr) + local_domain_len + name_len + 2);
-	      if (__builtin_expect (tmp == NULL, 0))
+	      if (__glibc_unlikely (tmp == NULL))
 		goto free_null;
 
 	      getnames[pos] = tmp;
@@ -235,7 +235,7 @@ nis_getnames (const_nis_name name)
 	      char *p;
 
 	      tmp = malloc (cplen + local_domain_len + name_len + 2);
-	      if (__builtin_expect (tmp == NULL, 0))
+	      if (__glibc_unlikely (tmp == NULL))
 		goto free_null;
 
 	      p = __stpcpy (tmp, name);
@@ -251,7 +251,7 @@ nis_getnames (const_nis_name name)
 	      char *p;
 
 	      tmp = malloc (cplen + name_len + 3);
-	      if (__builtin_expect (tmp == NULL, 0))
+	      if (__glibc_unlikely (tmp == NULL))
 		goto free_null;
 
 	      p = __mempcpy (tmp, name, name_len);
@@ -267,7 +267,7 @@ nis_getnames (const_nis_name name)
 	      count += 5;
 	      nis_name *newp = realloc (getnames,
 					(count + 1) * sizeof (char *));
-	      if (__builtin_expect (newp == NULL, 0))
+	      if (__glibc_unlikely (newp == NULL))
 		goto free_null;
 	      getnames = newp;
 	    }