From 281aa43a363d7072664aaa4271dc65f8a8f1f61c Mon Sep 17 00:00:00 2001 From: jb Date: Tue, 1 Apr 1997 22:44:18 +0000 Subject: Add parentheses to make blocking mode work. --- lib/libpthread/thread/thr_readv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libpthread/thread/thr_readv.c') diff --git a/lib/libpthread/thread/thr_readv.c b/lib/libpthread/thread/thr_readv.c index fed418b..3ea065e 100644 --- a/lib/libpthread/thread/thr_readv.c +++ b/lib/libpthread/thread/thr_readv.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include #include @@ -50,7 +52,7 @@ readv(int fd, const struct iovec * iov, int iovcnt) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking readv syscall: */ while ((ret = _thread_sys_readv(fd, iov, iovcnt)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; -- cgit v1.1