From 1d863dc0b41da22b5a06110d67b47a0f102cb639 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 30 Jun 1999 17:41:35 +0000 Subject: Update. 1999-06-30 Ulrich Drepper * sysdeps/unix/sysv/linux/gethostid.c: Handle failing call to getxxbyYY_r functions correctly for non-existing entry. * sunrpc/getrpcport.c: Likewise. * sunrpc/clnt_simp.c: Likewise. * inet/rexec.c: Likewise. * sunrpc/clnt_gen.c: Likewise. * inet/rcmd.c: Likewise. * sysdeps/generic/glob.c: Likewise. --- sysdeps/generic/glob.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sysdeps/generic/glob.c') diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c index b48dd7c..9b134c5 100644 --- a/sysdeps/generic/glob.c +++ b/sysdeps/generic/glob.c @@ -650,13 +650,12 @@ glob (pattern, flags, errfunc, pglob) pwbuflen = 1024; pwtmpbuf = (char *) __alloca (pwbuflen); - success = 1; while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) != 0) { if (errno != ERANGE) { - success = 0; + p = NULL; break; } pwbuflen *= 2; @@ -665,9 +664,8 @@ glob (pattern, flags, errfunc, pglob) } # else p = getpwnam (name); - success = p != NULL; # endif - if (success) + if (p != NULL) home_dir = p->pw_dir; } } -- cgit v1.1