From 48343e99b8bb27fdc7763e521ea7e651ecc7a7ba Mon Sep 17 00:00:00 2001 From: NRK Date: Thu, 3 Feb 2022 14:22:25 +0600 Subject: code-style: prefer calloc over malloc+memset --- main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index e29c051..58538f0 100644 --- a/main.c +++ b/main.c @@ -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) { -- cgit v1.2.3-70-g09d2