Fix error handling for select()

Previously the error handling code for select() was unreachable.
This commit is contained in:
Jakub Wilk 2016-05-09 22:04:56 +02:00
parent 76aa8ca727
commit bfe5c07279

View file

@ -72,7 +72,7 @@ void wait_for_tty_device(void)
/* Block until input becomes available or timeout */
status = select(STDIN_FILENO + 1, &rdfs, NULL, NULL, &tv);
if (status)
if (status > 0)
{
/* Input from stdin ready */
@ -229,7 +229,7 @@ int connect_tty(void)
/* Block until input becomes available */
status = select(maxfd, &rdfs, NULL, NULL, NULL);
if (status)
if (status > 0)
{
if (FD_ISSET(fd, &rdfs))
{