projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mgetgroups: remove dependency on realloc-gnu
[gnulib.git]
/
lib
/
mgetgroups.c
diff --git
a/lib/mgetgroups.c
b/lib/mgetgroups.c
index
2d82f45
..
846662b
100644
(file)
--- a/
lib/mgetgroups.c
+++ b/
lib/mgetgroups.c
@@
-133,7
+133,7
@@
mgetgroups (char const *username, gid_t gid, gid_t **groups)
return -1;
}
- if (
!username && gid != (gid_t) -1
)
+ if (
max_n_groups == 0 || (!username && gid != (gid_t) -1)
)
max_n_groups++;
g = realloc_groupbuf (NULL, max_n_groups);
if (g == NULL)