We've simplified the function so much in the previous commits, that now
$2 is rather useless. It only sets the output parameter to the same
value that the function returns. It's simpler if the caller just sets
it itself after the call.
This removes the only 3-star pointer in the entire project. :)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
static /*@null@*/char **
-build_list(char *s, char ***lp)
+build_list(char *s)
{
char **l;
size_t n;
l = XREALLOC(l, n + 1, char *);
l[n] = NULL;
- *lp = l;
-
return l;
}
free (admins);
free (members);
- sgroup.sg_adm = build_list(fields[2], &admins);
- sgroup.sg_mem = build_list(fields[3], &members);
+ sgroup.sg_adm = admins = build_list(fields[2]);
+ sgroup.sg_mem = members = build_list(fields[3]);
return &sgroup;
}