summaryrefslogtreecommitdiff
path: root/lib/libedit
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2011-11-18 20:32:00 +0000
committerchristos <christos@NetBSD.org>2011-11-18 20:32:00 +0000
commita47eaa79975aa92aa229c922a2ab230e30c2a237 (patch)
treedac61e0b0ba64e376dc87869106c0f335c679332 /lib/libedit
parent32e6e57160d30b62d9e63f41a3eba8c8dc138d27 (diff)
Initialize termbuf (Kamil Dudka)
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/terminal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libedit/terminal.c b/lib/libedit/terminal.c
index 8c9e41fa4b1..88ff867740d 100644
--- a/lib/libedit/terminal.c
+++ b/lib/libedit/terminal.c
@@ -1,4 +1,4 @@
-/* $NetBSD: terminal.c,v 1.11 2011/11/18 20:25:48 christos Exp $ */
+/* $NetBSD: terminal.c,v 1.12 2011/11/18 20:32:00 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95";
#else
-__RCSID("$NetBSD: terminal.c,v 1.11 2011/11/18 20:25:48 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.12 2011/11/18 20:32:00 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -330,6 +330,7 @@ terminal_alloc(EditLine *el, const struct termcapstr *t, const char *cap)
char **tlist = el->el_terminal.t_str;
char **tmp, **str = &tlist[t - tstr];
+ (void) memset(termbuf, 0, sizeof(termbuf));
if (cap == NULL || *cap == '\0') {
*str = NULL;
return;
@@ -877,7 +878,7 @@ terminal_set(EditLine *el, const char *term)
if (strcmp(term, "emacs") == 0)
el->el_flags |= EDIT_DISABLED;
- memset(el->el_terminal.t_cap, 0, TC_BUFSIZE);
+ (void) memset(el->el_terminal.t_cap, 0, TC_BUFSIZE);
i = tgetent(el->el_terminal.t_cap, term);