Initialize t.c_lflag before reading it.

Fixes #577473.
This commit is contained in:
mainzelm 2002-07-04 16:46:23 +00:00
parent b951e1c933
commit e74e23388e
1 changed files with 5 additions and 5 deletions

View File

@ -120,16 +120,16 @@ s48_value scheme_tcsetattr(s48_value sch_fd, s48_value sch_option,
** in raw mode. Ah, Unix. ** in raw mode. Ah, Unix.
*/ */
if( (VMIN != VEOF && VTIME != VEOL) || !(t.c_lflag & ICANON) ) {
t.c_cc[VMIN] = s48_extract_fixnum (sch_min);
t.c_cc[VTIME] = s48_extract_integer (sch_time);
}
t.c_iflag = s48_extract_integer (sch_iflag); t.c_iflag = s48_extract_integer (sch_iflag);
t.c_oflag = s48_extract_integer (sch_oflag); t.c_oflag = s48_extract_integer (sch_oflag);
t.c_cflag = s48_extract_integer (sch_cflag); t.c_cflag = s48_extract_integer (sch_cflag);
t.c_lflag = s48_extract_integer (sch_lflag); t.c_lflag = s48_extract_integer (sch_lflag);
if( (VMIN != VEOF && VTIME != VEOL) || !(t.c_lflag & ICANON) ) {
t.c_cc[VMIN] = s48_extract_fixnum (sch_min);
t.c_cc[VTIME] = s48_extract_integer (sch_time);
}
cfsetispeed(&t, s48_extract_integer (sch_ispeed)); cfsetispeed(&t, s48_extract_integer (sch_ispeed));
cfsetospeed(&t, s48_extract_integer (sch_ospeed)); cfsetospeed(&t, s48_extract_integer (sch_ospeed));