diff --git a/serial_posix.c b/serial_posix.c index a49f6c8..2648294 100644 --- a/serial_posix.c +++ b/serial_posix.c @@ -376,7 +376,7 @@ serial_poll_internal (int fd, int queue, long timeout, const struct timeval *tim FD_SET (fd, &fds); int rc = 0; - while (rc = MYSELECT (fd + 1, &fds, queue, timeout >= 0 ? &tvt : NULL) == -1) { + while ((rc = MYSELECT (fd + 1, &fds, queue, timeout >= 0 ? &tvt : NULL)) == -1) { if (errno != EINTR ) { TRACE ("select"); return -1;