summaryrefslogtreecommitdiff
path: root/src/passwd/fgetpwent.c
diff options
context:
space:
mode:
authorJosiah Worcester <josiahw@gmail.com>2015-02-10 18:32:55 -0600
committerRich Felker <dalias@aerifal.cx>2015-02-10 22:57:02 -0500
commit700e08993c3f6a808773d56424aa7e633da13e2e (patch)
tree752558943d55b652eb61469e818ac1dceaad6238 /src/passwd/fgetpwent.c
parent74e334dcd177b585c64ddafa732a3dc9e3f6b5ec (diff)
downloadmusl-700e08993c3f6a808773d56424aa7e633da13e2e.tar.gz
refactor passwd file access code
this allows getpwnam and getpwuid to share code with the _r versions in preparation for alternate backend support.
Diffstat (limited to 'src/passwd/fgetpwent.c')
-rw-r--r--src/passwd/fgetpwent.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passwd/fgetpwent.c b/src/passwd/fgetpwent.c
index eb47b2a1..fd472a07 100644
--- a/src/passwd/fgetpwent.c
+++ b/src/passwd/fgetpwent.c
@@ -6,5 +6,7 @@ struct passwd *fgetpwent(FILE *f)
static char *line;
static struct passwd pw;
size_t size=0;
- return __getpwent_a(f, &pw, &line, &size);
+ struct passwd *res;
+ __getpwent_a(f, &pw, &line, &size, &res);
+ return res;
}