From c07e72504d045f8e5070668e61fa5d8a3290ab66 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 25 Jun 2017 23:20:54 -0400 Subject: Remove xmalloc from gawkmisc.c, and improve dfa xalloc by using calloc instead of malloc+memset. --- support/dfa.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'support/dfa.c') diff --git a/support/dfa.c b/support/dfa.c index 18c17a5d..3a675f5d 100644 --- a/support/dfa.c +++ b/support/dfa.c @@ -4062,12 +4062,7 @@ dfamustfree (struct dfamust *dm) struct dfa * dfaalloc (void) { - void *p = xmalloc (sizeof (struct dfa)); - if (p) - { - memset (p, 0, sizeof (struct dfa)); - } - return p; + return xzalloc (sizeof (struct dfa)); } /* Initialize DFA. */ -- cgit v1.2.3