Lines Matching refs:n
120 static int get_groups(const char *username, gid_t rgid, gid_t *groups, int *n) in get_groups() argument
128 m = getgrouplist(username, rgid, groups, n); in get_groups()
131 if (*n < 0) in get_groups()
136 *n = getgroups(*n, groups); in get_groups()
137 if (*n >= 0) in get_groups()
138 return *n; in get_groups()
141 *n = getgroups(0, groups); /* get needed *n */ in get_groups()
143 return -(*n >= 0); in get_groups()
197 int n; in id_main() local
217 n = 64; in id_main()
218 if (get_groups(username, rgid, groups, &n) < 0) { in id_main()
220 groups = xrealloc(groups, n * sizeof(groups[0])); in id_main()
221 get_groups(username, rgid, groups, &n); in id_main()
223 if (n > 0) { in id_main()
226 for (i = 0; i < n; i++) { in id_main()
232 } else if (n < 0) { /* error in get_groups() */ in id_main()