diff options
author | Josiah Worcester <josiahw@gmail.com> | 2015-02-07 15:40:46 -0600 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-02-13 01:46:51 -0500 |
commit | 7c5f0a5212127b70486159af80e24fd96262ec88 (patch) | |
tree | 767c31af77ff639f324a0fe2e8dcd422f467e937 /src/passwd/fgetgrent.c | |
parent | 4e8a3561652ebcda6a126b3162fc545573889dc4 (diff) | |
download | musl-7c5f0a5212127b70486159af80e24fd96262ec88.tar.gz musl-7c5f0a5212127b70486159af80e24fd96262ec88.tar.bz2 musl-7c5f0a5212127b70486159af80e24fd96262ec88.tar.xz musl-7c5f0a5212127b70486159af80e24fd96262ec88.zip |
refactor group file access code
this allows getgrnam and getgrgid to share code with the _r versions
in preparation for alternate backend support.
Diffstat (limited to 'src/passwd/fgetgrent.c')
-rw-r--r-- | src/passwd/fgetgrent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passwd/fgetgrent.c b/src/passwd/fgetgrent.c index d8d1c773..7d045fd2 100644 --- a/src/passwd/fgetgrent.c +++ b/src/passwd/fgetgrent.c @@ -5,6 +5,8 @@ struct group *fgetgrent(FILE *f) { static char *line, **mem; static struct group gr; + struct group *res; size_t size=0, nmem=0; - return __getgrent_a(f, &gr, &line, &size, &mem, &nmem); + __getgrent_a(f, &gr, &line, &size, &mem, &nmem, &res); + return res; } |