From 288b15d0793936fa14b51ed860056f6ce6200c52 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 22 Jun 2017 08:26:27 -0400 Subject: Replace malloc+memset with calloc, mostly by using the new ezalloc macro. --- extension/filefuncs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'extension/filefuncs.c') diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 394de504..9ca22de8 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -877,8 +877,7 @@ do_fts(int nargs, awk_value_t *result, struct awk_ext_func *unused) /* make pathvector */ count = path_array->count + 1; - emalloc(pathvector, char **, count * sizeof(char *), "do_fts"); - memset(pathvector, 0, count * sizeof(char *)); + ezalloc(pathvector, char **, count * sizeof(char *), "do_fts"); /* fill it in */ count--; /* ignore final NULL at end of vector */ -- cgit v1.2.3