diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-09-29 13:41:26 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-09-29 13:41:26 +0000 |
| commit | fcd58c1978a1916f5a1e94603bb31c17b00621e4 (patch) | |
| tree | feedcb58690cda51d991a21d32b1b028bf509260 /lib/libc_r | |
| parent | be0dabc1bcb9f9f27a07eebe94cd982aba7cfe3f (diff) | |
Notes
Diffstat (limited to 'lib/libc_r')
| -rw-r--r-- | lib/libc_r/uthread/uthread_write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_write.c b/lib/libc_r/uthread/uthread_write.c index 85ef9ebefcc9..123a88e1e3c1 100644 --- a/lib/libc_r/uthread/uthread_write.c +++ b/lib/libc_r/uthread/uthread_write.c @@ -95,7 +95,7 @@ _write(int fd, const void *buf, size_t nbytes) * write: */ if (blocking && ((n < 0 && (errno == EWOULDBLOCK || - errno == EAGAIN)) || (n >= 0 && num < nbytes))) { + errno == EAGAIN)) || (n > 0 && num < nbytes))) { curthread->data.fd.fd = fd; _thread_kern_set_timeout(NULL); @@ -133,7 +133,7 @@ _write(int fd, const void *buf, size_t nbytes) * If there was an error, return partial success * (if any bytes were written) or else the error: */ - } else if (n < 0) { + } else if (n <= 0) { if (num > 0) ret = num; else |
