From 34d794b293a7103a77cf8bfb78a8af90484b4dad Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Sun, 9 Mar 2003 23:29:57 +0000 Subject: [PATCH] some cleanup svn:r56 --- test/regress.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/regress.c b/test/regress.c index a5f7d44f..4063d003 100644 --- a/test/regress.c +++ b/test/regress.c @@ -102,13 +102,15 @@ multiple_write_cb(int fd, short event, void *arg) len = write(fd, wbuf + woff, len); if (len == -1) { fprintf(stderr, "%s: write\n", __func__); + if (usepersist) + event_del(ev); return; } woff += len; if (woff >= sizeof(wbuf)) { - shutdown(pair[0], SHUT_WR); + shutdown(fd, SHUT_WR); if (usepersist) event_del(ev); return; @@ -125,11 +127,9 @@ multiple_read_cb(int fd, short event, void *arg) int len; len = read(fd, rbuf + roff, sizeof(rbuf) - roff); - if (len == -1) { + if (len == -1) fprintf(stderr, "%s: read\n", __func__); - return; - } - if (len == 0) { + if (len <= 0) { if (usepersist) event_del(ev); return; -- 2.40.0