aboutsummaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-06-22 08:26:27 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-06-22 08:26:27 -0400
commit288b15d0793936fa14b51ed860056f6ce6200c52 (patch)
tree5de9e9dca8b30e8d168da8661ae88e3ffe2504a3 /command.c
parentb7d8b6ebcd5dd714bc21acf7637d9a651e2f7ea7 (diff)
downloadegawk-288b15d0793936fa14b51ed860056f6ce6200c52.tar.gz
egawk-288b15d0793936fa14b51ed860056f6ce6200c52.tar.bz2
egawk-288b15d0793936fa14b51ed860056f6ce6200c52.zip
Replace malloc+memset with calloc, mostly by using the new ezalloc macro.
Diffstat (limited to 'command.c')
-rw-r--r--command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/command.c b/command.c
index a0469bb8..1d804c75 100644
--- a/command.c
+++ b/command.c
@@ -2707,8 +2707,7 @@ static CMDARG *
mk_cmdarg(enum argtype type)
{
CMDARG *arg;
- emalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg");
- memset(arg, 0, sizeof(CMDARG));
+ ezalloc(arg, CMDARG *, sizeof(CMDARG), "mk_cmdarg");
arg->type = type;
return arg;
}