Commit d7272cff authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(init_baud_rate) [HAVE_TERMIOS]: Use cfgetospeed.

parent cef13e55
......@@ -239,7 +239,7 @@ init_baud_rate ()
sg.c_cflag = (sg.c_cflag & ~CBAUD) | B9600;
tcgetattr (0, &sg);
ospeed = sg.c_cflag & CBAUD;
ospeed = cfgetospeed (&sg);
#else /* neither VMS nor TERMIOS */
#ifdef HAVE_TERMIO
struct termio sg;
......@@ -255,7 +255,8 @@ init_baud_rate ()
struct sgttyb sg;
sg.sg_ospeed = B9600;
ioctl (0, TIOCGETP, &sg);
if (ioctl (0, TIOCGETP, &sg) < 0)
abort ();
ospeed = sg.sg_ospeed;
#endif /* not HAVE_TERMIO */
#endif /* not HAVE_TERMIOS */
......
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