about summary refs log tree commit diff
path: root/pwd/fgetpwent_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'pwd/fgetpwent_r.c')
-rw-r--r--pwd/fgetpwent_r.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pwd/fgetpwent_r.c b/pwd/fgetpwent_r.c
index 4986e7452c..c2a746d902 100644
--- a/pwd/fgetpwent_r.c
+++ b/pwd/fgetpwent_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
@@ -92,7 +92,8 @@ __fgetpwent_r (FILE *stream, struct passwd *resbuf, char *buffer,
 	{
 	  funlockfile (stream);
 	  *result = NULL;
-	  return errno = ERANGE;
+	  __set_errno (ERANGE);
+	  return errno;
 	}
 
       /* Skip leading blanks.  */