diff options
author | Josiah Worcester <josiahw@gmail.com> | 2015-02-10 18:32:55 -0600 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-10 22:57:02 -0500 |
commit | 700e08993c3f6a808773d56424aa7e633da13e2e (patch) | |
tree | 752558943d55b652eb61469e818ac1dceaad6238 /src/passwd/fgetpwent.c | |
parent | 74e334dcd177b585c64ddafa732a3dc9e3f6b5ec (diff) | |
download | musl-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.c | 4 |
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; } |