]> git.eshelyaron.com Git - emacs.git/commitdiff
(emacs_get_tty): Zero out termios structure before
authorAndreas Schwab <schwab@suse.de>
Wed, 29 Apr 1998 09:42:46 +0000 (09:42 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 29 Apr 1998 09:42:46 +0000 (09:42 +0000)
getting attributes to get consistent values for holes.
(emacs_set_tty): Likewise.

src/sysdep.c

index ea01f3515fc99e7982782dcb286bab068912d77e..4fad9bc1ed90b410a16aa03ac583f1b9d788094b 100644 (file)
@@ -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