]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set *RESULT to NULL before returning error.
authorUlrich Drepper <drepper@redhat.com>
Sat, 19 Apr 1997 15:19:31 +0000 (15:19 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 19 Apr 1997 15:19:31 +0000 (15:19 +0000)
shadow/fgetspent_r.c

index 4614b514c81d41d8393115ee69e686c322bebb8c..403eecf76102463b9549e3f93eb0b8b32d9a2733 100644 (file)
@@ -42,7 +42,10 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen,
     {
       p = fgets (buffer, buflen, stream);
       if (p == NULL)
-       return errno;
+       {
+         *result = NULL;
+         return errno;
+       }
 
       /* Skip leading blanks.  */
       while (isspace (*p))