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. --- node.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'node.c') diff --git a/node.c b/node.c index 962a650d..200d61dc 100644 --- a/node.c +++ b/node.c @@ -728,8 +728,7 @@ str2wstr(NODE *n, size_t **ptr) * Create the array. */ if (ptr != NULL) { - emalloc(*ptr, size_t *, sizeof(size_t) * n->stlen, "str2wstr"); - memset(*ptr, 0, sizeof(size_t) * n->stlen); + ezalloc(*ptr, size_t *, sizeof(size_t) * n->stlen, "str2wstr"); } sp = n->stptr; -- cgit v1.2.3