Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Initialize termbuf (Kamil Dudka)
details: https://anonhg.NetBSD.org/src/rev/e830bed2c3e3
branches: trunk
changeset: 771300:e830bed2c3e3
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 18 20:32:00 2011 +0000
description:
Initialize termbuf (Kamil Dudka)
diffstat:
lib/libedit/terminal.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 12cafcaade64 -r e830bed2c3e3 lib/libedit/terminal.c
--- a/lib/libedit/terminal.c Fri Nov 18 20:30:01 2011 +0000
+++ b/lib/libedit/terminal.c Fri Nov 18 20:32:00 2011 +0000
@@ -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 @@
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 @@
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);
Home |
Main Index |
Thread Index |
Old Index