mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
pac: Consistently use item count as the first argument to calloc
Reported by: GCC 14 -Wcalloc-transposed-args
This commit is contained in:
parent
f94513a3a3
commit
22956bc9dc
1 changed files with 2 additions and 2 deletions
|
|
@ -248,7 +248,7 @@ dumpit(void)
|
|||
|
||||
hp = hashtab[0];
|
||||
hno = 1;
|
||||
base = (struct hent **) calloc(sizeof hp, hcount);
|
||||
base = (struct hent **) calloc(hcount, sizeof(hp));
|
||||
for (ap = base, c = hcount; c--; ap++) {
|
||||
while (hp == NULL)
|
||||
hp = hashtab[hno++];
|
||||
|
|
@ -326,7 +326,7 @@ enter(const char name[])
|
|||
return(hp);
|
||||
h = hash(name);
|
||||
hcount++;
|
||||
hp = (struct hent *) calloc(sizeof *hp, (size_t)1);
|
||||
hp = (struct hent *) calloc(1, sizeof(*hp));
|
||||
hp->h_name = strdup(name);
|
||||
hp->h_feetpages = 0.0;
|
||||
hp->h_count = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue