version 1.18, 2001/11/21 20:41:55 |
version 1.19, 2002/08/12 00:42:56 |
|
|
gname = *argv; |
gname = *argv; |
h = hash(gname); |
h = hash(gname); |
if ((gh = findgroup(gname)) == NULL) { |
if ((gh = findgroup(gname)) == NULL) { |
if ((gh = (struct grouphead *)calloc(sizeof(*gh), 1)) == NULL) |
if ((gh = (struct grouphead *)calloc(1, sizeof(*gh))) == NULL) |
errx(1, "Out of memory"); |
errx(1, "Out of memory"); |
gh->g_name = vcopy(gname); |
gh->g_name = vcopy(gname); |
gh->g_list = NULL; |
gh->g_list = NULL; |
|
|
*/ |
*/ |
|
|
for (ap = argv+1; *ap != NULL; ap++) { |
for (ap = argv+1; *ap != NULL; ap++) { |
if ((gp = (struct group *)calloc(sizeof(*gp), 1)) == NULL) |
if ((gp = (struct group *)calloc(1, sizeof(*gp))) == NULL) |
errx(1, "Out of memory"); |
errx(1, "Out of memory"); |
gp->ge_name = vcopy(*ap); |
gp->ge_name = vcopy(*ap); |
gp->ge_link = gh->g_list; |
gp->ge_link = gh->g_list; |