aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2003-10-11 18:37:09 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2003-10-11 18:37:09 +0000
commitf63eff5765e872219e93c06b54762e29504617bd (patch)
treeb87656d1d1ce4c0f937d11ef032cf9fca8e1f7b6 /lib
parent7886bc6980c1f59bd282c60f903e5e05606b7793 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/uthread/uthread_write.c4
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 7d74b824283a..19d474f21d93 100644
--- a/lib/libc_r/uthread/uthread_write.c
+++ b/lib/libc_r/uthread/uthread_write.c
@@ -93,7 +93,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);
@@ -131,7 +131,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