mail(1): Invert calloc(3) argument order.

calloc(3) is documented to have first a number and then a size.

Obtained from:	OpenBSD (through NetBSD)
This commit is contained in:
Pedro F. Giffuni 2016-07-10 02:46:20 +00:00
parent a8916479cc
commit d6f7a4fb17
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302511
2 changed files with 3 additions and 3 deletions

View File

@ -463,7 +463,7 @@ group(char **argv)
gname = *argv;
h = hash(gname);
if ((gh = findgroup(gname)) == NULL) {
gh = calloc(sizeof(*gh), 1);
gh = calloc(1, sizeof(*gh));
gh->g_name = vcopy(gname);
gh->g_list = NULL;
gh->g_link = groups[h];
@ -477,7 +477,7 @@ group(char **argv)
*/
for (ap = argv+1; *ap != NULL; ap++) {
gp = calloc(sizeof(*gp), 1);
gp = calloc(1, sizeof(*gp));
gp->ge_name = vcopy(*ap);
gp->ge_link = gh->g_list;
gh->g_list = gp;

View File

@ -56,7 +56,7 @@ assign(const char *name, const char *value)
h = hash(name);
vp = lookup(name);
if (vp == NULL) {
vp = calloc(sizeof(*vp), 1);
vp = calloc(1, sizeof(*vp));
vp->v_name = vcopy(name);
vp->v_link = variables[h];
variables[h] = vp;