From 0025221268bac6e9cf803fc25a3955b77cb6e0e6 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 28 Feb 2008 14:20:51 +0000 Subject: [PATCH] Fixed another regression in the timeout code. The assignment needs extra parentheses, because it has lower precedence than the relational operator. --- serial_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;