aboutsummaryrefslogtreecommitdiff
path: root/lib/libkse/thread/thr_writev.c
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1997-04-01 22:44:18 +0000
committerJohn Birrell <jb@FreeBSD.org>1997-04-01 22:44:18 +0000
commite710f8d85bb8ba0acdcd0e5b4bfa2b1abac9ed46 (patch)
treee7d6679886be8c7c2f41dc1756fad81f40147da9 /lib/libkse/thread/thr_writev.c
parent796655339724a33d2c7bc9dcf05326998e28a19b (diff)
downloadsrc-e710f8d85bb8ba0acdcd0e5b4bfa2b1abac9ed46.tar.gz
src-e710f8d85bb8ba0acdcd0e5b4bfa2b1abac9ed46.zip
Add parentheses to make blocking mode work.
Notes
Notes: svn path=/head/; revision=24518
Diffstat (limited to 'lib/libkse/thread/thr_writev.c')
-rw-r--r--lib/libkse/thread/thr_writev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_writev.c b/lib/libkse/thread/thr_writev.c
index 2a3c0c84c2d0..5ad1ce93bf0b 100644
--- a/lib/libkse/thread/thr_writev.c
+++ b/lib/libkse/thread/thr_writev.c
@@ -29,6 +29,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
+ * $Id$
+ *
*/
#include <sys/types.h>
#include <sys/fcntl.h>
@@ -50,7 +52,7 @@ writev(int fd, const struct iovec * iov, int iovcnt)
__FILE__, __LINE__)) == 0) {
/* Perform a non-blocking writev syscall: */
while ((ret = _thread_sys_writev(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;