aboutsummaryrefslogtreecommitdiffstats
path: root/extension/gawkfts.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-06-23 12:45:16 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-06-23 12:45:16 +0300
commit5ea4224acd6effc77359d42436de4804b86f1112 (patch)
tree9d4936e21342b71fd43de7cac311822677caad98 /extension/gawkfts.c
parent231cb5df34699fd98001e2e124d73da5d2f795f9 (diff)
parent44e29458a6355ad64e8d89676a441b224ce76cbc (diff)
downloadegawk-5ea4224acd6effc77359d42436de4804b86f1112.tar.gz
egawk-5ea4224acd6effc77359d42436de4804b86f1112.tar.bz2
egawk-5ea4224acd6effc77359d42436de4804b86f1112.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'extension/gawkfts.c')
-rw-r--r--extension/gawkfts.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/extension/gawkfts.c b/extension/gawkfts.c
index 4a712153..d9edd87f 100644
--- a/extension/gawkfts.c
+++ b/extension/gawkfts.c
@@ -162,9 +162,8 @@ fts_open(char * const *argv, int options,
}
/* Allocate/initialize the stream */
- if ((sp = malloc((unsigned int)sizeof(FTS))) == NULL)
+ if ((sp = calloc(1, (unsigned int)sizeof(FTS))) == NULL)
return (NULL);
- memset(sp, 0, sizeof(FTS));
sp->fts_compar = compar;
sp->fts_options = options;