mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(xgetgroups): Use variable name, rather than type name in computing buffer
size for xnmalloc.
This commit is contained in:
1 parent
76ef73f50a
commit
1c4154dbb0
1 file changed
+1
-1
@@ -261,7 +261,7 @@ xgetgroups (const char *username, gid_t gid, int *n_groups,
|
||||
else
|
||||
max_n_groups = getugroups (0, NULL, username, gid);
|
||||
|
||||
g = xnmalloc (max_n_groups, sizeof (GETGROUPS_T));
|
||||
g = xnmalloc (max_n_groups, sizeof *g);
|
||||
if (username == 0)
|
||||
ng = getgroups (max_n_groups, g);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user