Commit 1d9f9f9e authored by Andreas Schwab's avatar Andreas Schwab
Browse files

(emacs_get_tty): Zero out termios structure before

getting attributes to get consistent values for holes.
(emacs_set_tty): Likewise.
parent 42d65b5f
......@@ -1069,6 +1069,7 @@ emacs_get_tty (fd, settings)
/* Retrieve the primary parameters - baud rate, character size, etcetera. */
/* 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment