summaryrefslogtreecommitdiff
path: root/shadow/fgetspent.c
diff options
context:
space:
mode:
Diffstat (limited to 'shadow/fgetspent.c')
-rw-r--r--shadow/fgetspent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shadow/fgetspent.c b/shadow/fgetspent.c
index d6c4e4fc05..8782b6b1b9 100644
--- a/shadow/fgetspent.c
+++ b/shadow/fgetspent.c
@@ -25,7 +25,9 @@ struct spwd *
fgetspent (FILE *stream)
{
static char buffer[BUFSIZ];
- static struct spwd result;
+ static struct spwd resbuf;
+ struct spwd *result;
- return __fgetspent_r (stream, &result, buffer, sizeof buffer);
+ return __fgetspent_r (stream, &resbuf, buffer, sizeof buffer, &result)
+ ? NULL : result;
}