aboutsummaryrefslogtreecommitdiffstats
path: root/support/dfa.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-06-25 23:20:54 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-06-25 23:20:54 -0400
commitc07e72504d045f8e5070668e61fa5d8a3290ab66 (patch)
tree27881767587e12327c16d39ef3cce5915e90b1c6 /support/dfa.c
parent44e29458a6355ad64e8d89676a441b224ce76cbc (diff)
downloadegawk-c07e72504d045f8e5070668e61fa5d8a3290ab66.tar.gz
egawk-c07e72504d045f8e5070668e61fa5d8a3290ab66.tar.bz2
egawk-c07e72504d045f8e5070668e61fa5d8a3290ab66.zip
Remove xmalloc from gawkmisc.c, and improve dfa xalloc by using calloc instead of malloc+memset.
Diffstat (limited to 'support/dfa.c')
-rw-r--r--support/dfa.c7
1 files changed, 1 insertions, 6 deletions
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. */