aboutsummaryrefslogtreecommitdiff
path: root/grp/fgetgrent.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-09 12:01:54 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-09 12:01:54 +0000
commite1c6ee839d13d57a4756e506a6b03f6a82b86d61 (patch)
treed8165cba8422ceb1f1871704ab322995593ac4ab /grp/fgetgrent.c
parentc41baa797637904ab405f14b78e722176abbdca1 (diff)
downloadglibc-e1c6ee839d13d57a4756e506a6b03f6a82b86d61.tar
glibc-e1c6ee839d13d57a4756e506a6b03f6a82b86d61.tar.gz
glibc-e1c6ee839d13d57a4756e506a6b03f6a82b86d61.tar.bz2
glibc-e1c6ee839d13d57a4756e506a6b03f6a82b86d61.zip
Update.
1999-06-09 Ulrich Drepper <drepper@cygnus.com> * pwd/fgetpwent_r.c: Set errno in the correct way. * shadow/fgetspent_r.c: Likewise. * pwd/fgetpwent.c: Handle long lines correctly. Little optimizations. Free static buffer when debugging memory handling. * shadow/fgetspent.c: Likewise. * grp/fgetgrent.c: Little optimization in loop. 1999-06-09 Andreas Jaeger <aj@arthur.rhein-neckar.de> * grp/tst_fgetgrent.c (write_group): Fix generation of long line in a different way.
Diffstat (limited to 'grp/fgetgrent.c')
-rw-r--r--grp/fgetgrent.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/grp/fgetgrent.c b/grp/fgetgrent.c
index d2e3de69a7..245524f178 100644
--- a/grp/fgetgrent.c
+++ b/grp/fgetgrent.c
@@ -52,8 +52,8 @@ fgetgrent (FILE *stream)
}
while (buffer != NULL
- && __fgetgrent_r (stream, &resbuf, buffer, buffer_size, &result) != 0
- && errno == ERANGE)
+ && (__fgetgrent_r (stream, &resbuf, buffer, buffer_size, &result)
+ == ERANGE))
{
char *new_buf;
buffer_size += NSS_BUFLEN_GROUP;
@@ -70,10 +70,7 @@ fgetgrent (FILE *stream)
/* Reset the stream. */
if (fsetpos (stream, &pos) != 0)
- {
- buffer = NULL;
- break;
- }
+ buffer = NULL;
}
if (buffer == NULL)