diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-06-07 20:18:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-06-07 20:18:43 +0000 |
commit | afa10f83bfa72b4ca870fc0125ce34bf7276c060 (patch) | |
tree | b592da074c686bc90b2bc76d506ea2f3efe3c3fb /grp | |
parent | 7a817a69320326e6ba3a7ff944546e7ce0418f9c (diff) |
(__fgetgrent_r): Set errno to ENOENT in case of EOF.
Diffstat (limited to 'grp')
-rw-r--r-- | grp/fgetgrent_r.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grp/fgetgrent_r.c b/grp/fgetgrent_r.c index 4abadfd569..0b1d782586 100644 --- a/grp/fgetgrent_r.c +++ b/grp/fgetgrent_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -74,13 +74,15 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen, { funlockfile (stream); *result = NULL; + __set_errno (ENOENT); return errno; } if (p == NULL || buffer[buflen - 1] != '\xff') { funlockfile (stream); *result = NULL; - return errno = ERANGE; + __set_errno (ERANGE); + return errno; } /* Skip leading blanks. */ |