aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
Diffstat (limited to 're.c')
-rw-r--r--re.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/re.c b/re.c
index 73e75cbb..cf369a97 100644
--- a/re.c
+++ b/re.c
@@ -168,8 +168,7 @@ make_regexp(const char *s, size_t len, bool ignorecase, bool dfa, bool canfatal)
*dest = '\0';
len = dest - buf;
- emalloc(rp, Regexp *, sizeof(*rp), "make_regexp");
- memset((char *) rp, 0, sizeof(*rp));
+ ezalloc(rp, Regexp *, sizeof(*rp), "make_regexp");
rp->pat.allocated = 0; /* regex will allocate the buffer */
emalloc(rp->pat.fastmap, char *, 256, "make_regexp");