aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2019-11-25 15:32:55 -0800
committerHaibo Huang <hhb@google.com>2019-11-25 15:34:35 -0800
commit892b8b381ae82ac3184900d989a516854d8b1197 (patch)
tree0d37bcbdabcdd0602b5444ceb0bb9af20a4496f3 /src/parse.c
parent459326d0af95beb84e0c94da3bc63ba9d764b3ea (diff)
downloadlibedit-llvm-r450784.tar.gz
Test: build Change-Id: I35977af76e0a89667a1858cffb1f1cb019ba4899
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.c b/src/parse.c
index 75c611e..2620f41 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $ */
+/* $NetBSD: parse.c,v 1.42 2019/07/23 10:18:52 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: parse.c,v 1.41 2018/11/29 03:10:20 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.42 2019/07/23 10:18:52 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -112,7 +112,7 @@ el_wparse(EditLine *el, int argc, const wchar_t *argv[])
if (ptr == argv[0])
return 0;
l = (size_t)(ptr - argv[0]);
- tprog = el_malloc((l + 1) * sizeof(*tprog));
+ tprog = el_calloc(l + 1, sizeof(*tprog));
if (tprog == NULL)
return 0;
(void) wcsncpy(tprog, argv[0], l);