summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-04-29 09:42:46 +0000
committerAndreas Schwab <schwab@suse.de>1998-04-29 09:42:46 +0000
commitedd981cba67ab1e98e45ce51fd34186793b68441 (patch)
tree0e0c3a38dffc8562da75cae767e10226b02bce6c /src/sysdep.c
parent5b282654b37a82270fcba41c02bdf92987684596 (diff)
downloademacs-edd981cba67ab1e98e45ce51fd34186793b68441.tar.gz
(emacs_get_tty): Zero out termios structure before
getting attributes to get consistent values for holes. (emacs_set_tty): Likewise.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index ea01f3515fc..4fad9bc1ed9 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1069,6 +1069,7 @@ emacs_get_tty (fd, settings)
/* Retrieve the primary parameters - baud rate, character size, etcetera. */
#ifdef HAVE_TCATTR
/* We have those nifty POSIX tcmumbleattr functions. */
+ bzero (&settings->main, sizeof (settings->main));
if (tcgetattr (fd, &settings->main) < 0)
return -1;
@@ -1147,6 +1148,7 @@ emacs_set_tty (fd, settings, flushp)
{
struct termios new;
+ bzero (&new, sizeof (new));
/* Get the current settings, and see if they're what we asked for. */
tcgetattr (fd, &new);
/* We cannot use memcmp on the whole structure here because under