summaryrefslogtreecommitdiff
path: root/usr.bin/nc/netcat.c
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2002-02-17 02:04:58 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2002-02-17 02:04:58 +0000
commit7d77b876dd5f005f98482cdb1d04ff6e5eebf65e (patch)
treea2984aff7e0051e189c30cec07a41cd27b7eec27 /usr.bin/nc/netcat.c
parentecdf2b0846992cd9ef85f54dcd64d136b2ad19f6 (diff)
fix pr#2091. patch applied.
patch from Brian J. Kifiak <bk@rt.fm> should be looked at closer..
Diffstat (limited to 'usr.bin/nc/netcat.c')
-rw-r--r--usr.bin/nc/netcat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index a8e53fd5000..51d2501ccbb 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.40 2002/02/16 21:27:50 millert Exp $ */
+/* $OpenBSD: netcat.c,v 1.41 2002/02/17 02:04:57 ericj Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -468,7 +468,7 @@ readwrite(int nfd)
}
if (pfd[1].revents & POLLIN) {
- if ((n = read(wfd, buf, sizeof(buf))) <= 0) {
+ if ((n = read(wfd, buf, sizeof(buf))) < 0) {
return;
} else
if((ret = atomicio(write, nfd, buf, n)) != n)