getopt: fix null pointer arithmetic ub
[musl] / src / passwd / fgetgrent.c
1 #define _GNU_SOURCE
2 #include "pwf.h"
3
4 struct group *fgetgrent(FILE *f)
5 {
6         static char *line, **mem;
7         static struct group gr;
8         struct group *res;
9         size_t size=0, nmem=0;
10         __getgrent_a(f, &gr, &line, &size, &mem, &nmem, &res);
11         return res;
12 }