aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-06-23 12:42:57 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-06-23 12:42:57 +0300
commitec2e54b2c075f30e9499adea22681499e3f6582d (patch)
treeeead84bdf1f41b78f90f00c13e02dd59eae92133 /io.c
parent9ccddb999bb2d79c261702f789deb9371090a4ec (diff)
parent44e29458a6355ad64e8d89676a441b224ce76cbc (diff)
downloadegawk-ec2e54b2c075f30e9499adea22681499e3f6582d.tar.gz
egawk-ec2e54b2c075f30e9499adea22681499e3f6582d.tar.bz2
egawk-ec2e54b2c075f30e9499adea22681499e3f6582d.zip
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'io.c')
-rw-r--r--io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/io.c b/io.c
index e08c3373..5d79e170 100644
--- a/io.c
+++ b/io.c
@@ -2803,8 +2803,7 @@ init_awkpath(path_info *pi)
max_path++;
// +3 --> 2 for null entries at front and end of path, 1 for NULL end of list
- emalloc(pi->awkpath, char **, (max_path + 3) * sizeof(char *), "init_awkpath");
- memset(pi->awkpath, 0, (max_path + 3) * sizeof(char *));
+ ezalloc(pi->awkpath, char **, (max_path + 3) * sizeof(char *), "init_awkpath");
start = path;
i = 0;
@@ -3211,9 +3210,8 @@ iop_alloc(int fd, const char *name, int errno_val)
{
IOBUF *iop;
- emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
+ ezalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
- memset(iop, '\0', sizeof(IOBUF));
iop->public.fd = fd;
iop->public.name = name;
iop->public.read_func = ( ssize_t(*)() ) read;