(xundump): Use malloc() instead of calloc() for fldca and fldidx,

because the used part of these arrays is explicitely initialized by
deffld().
This commit is contained in:
Markus Armbruster 2007-08-05 18:52:16 +00:00
parent 5e65a9dd3c
commit 9394ca0630

View file

@ -771,8 +771,8 @@ xundump(FILE *fp, char *file, int *plno, int expected_table)
if (!(ca[i].ca_flags & NSC_EXTRA)) if (!(ca[i].ca_flags & NSC_EXTRA))
nf += MAX(1, ca[i].ca_type != NSC_STRINGY ? ca[i].ca_len : 0); nf += MAX(1, ca[i].ca_type != NSC_STRINGY ? ca[i].ca_len : 0);
} }
fldca = calloc(nf, sizeof(*fldca)); fldca = malloc(nf * sizeof(*fldca));
fldidx = calloc(nf, sizeof(*fldidx)); fldidx = malloc(nf * sizeof(*fldidx));
caflds = malloc(nca * sizeof(*caflds)); caflds = malloc(nca * sizeof(*caflds));
cafldspp = calloc(nca, sizeof(*cafldspp)); cafldspp = calloc(nca, sizeof(*cafldspp));
cur_type = type; cur_type = type;