code-style: prefer calloc over malloc+memset

This commit is contained in:
NRK
2022-02-03 14:22:25 +06:00
committed by N-R-K
parent 9cdeeab9b8
commit 48343e99b8
4 changed files with 15 additions and 7 deletions

3
main.c
View File

@ -849,8 +849,7 @@ int main(int argc, char *argv[])
else
filecnt = options->filecnt;
files = emalloc(filecnt * sizeof(*files));
memset(files, 0, filecnt * sizeof(*files));
files = ecalloc(filecnt, sizeof(*files));
fileidx = 0;
if (options->from_stdin) {