aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y9
1 files changed, 3 insertions, 6 deletions
diff --git a/awkgram.y b/awkgram.y
index e4f5bab0..ad6873bb 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -2393,8 +2393,7 @@ yyerror(const char *m, ...)
count = strlen(mesg) + 1;
if (lexptr != NULL)
count += (lexeme - thisline) + 2;
- emalloc(buf, char *, count+1, "yyerror");
- memset(buf, 0, count+1);
+ ezalloc(buf, char *, count+1, "yyerror");
bp = buf;
@@ -2613,8 +2612,7 @@ do_add_srcfile(enum srctype stype, char *src, char *path, SRCFILE *thisfile)
{
SRCFILE *s;
- emalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile");
- memset(s, 0, sizeof(SRCFILE));
+ ezalloc(s, SRCFILE *, sizeof(SRCFILE), "do_add_srcfile");
s->src = estrdup(src, strlen(src));
s->fullpath = path;
s->stype = stype;
@@ -4893,8 +4891,7 @@ func_use(const char *name, enum defref how)
/* not in the table, fall through to allocate a new one */
- emalloc(fp, struct fdesc *, sizeof(struct fdesc), "func_use");
- memset(fp, '\0', sizeof(struct fdesc));
+ ezalloc(fp, struct fdesc *, sizeof(struct fdesc), "func_use");
emalloc(fp->name, char *, len + 1, "func_use");
strcpy(fp->name, name);
fp->next = ftable[ind];