about summary refs log tree commit diff
path: root/sysdeps/generic/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/glob.c')
-rw-r--r--sysdeps/generic/glob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index fe09f50a10..b48dd7c84a 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -651,7 +651,8 @@ glob (pattern, flags, errfunc, pglob)
 		  pwtmpbuf = (char *) __alloca (pwbuflen);
 
 		  success = 1;
-		  while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) < 0)
+		  while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
+			 != 0)
 		    {
 		      if (errno != ERANGE)
 			{
@@ -735,7 +736,7 @@ glob (pattern, flags, errfunc, pglob)
 	      buflen = 1024;
 	    pwtmpbuf = (char *) __alloca (buflen);
 
-	    while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) < 0)
+	    while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
 	      {
 		if (errno != ERANGE)
 		  {