From 7d77b876dd5f005f98482cdb1d04ff6e5eebf65e Mon Sep 17 00:00:00 2001 From: Eric Jackson Date: Sun, 17 Feb 2002 02:04:58 +0000 Subject: fix pr#2091. patch applied. patch from Brian J. Kifiak should be looked at closer.. --- usr.bin/nc/netcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/nc') 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 * @@ -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) -- cgit v1.2.3