From b14afebf3e3ade6249c9ce6108f8090a2c53bb1d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 25 Jan 2008 15:52:02 +0000 Subject: [PATCH] update git-svn-id: http://svn.openzap.org/svn/openzap/trunk@371 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/zap_io.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index 9013acb4de..a88f4f661e 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -1483,10 +1483,10 @@ zap_status_t zap_channel_read(zap_channel_t *zchan, void *data, zap_size_t *data } status = zchan->zio->read(zchan, data, datalen); - if (zchan->fds[0]) { + if (zchan->fds[0] > -1) { int dlen = (int) *datalen; if (write(zchan->fds[0], data, dlen) != dlen) { - snprintf(zchan->last_error, sizeof(zchan->last_error), "write error!"); + snprintf(zchan->last_error, sizeof(zchan->last_error), "file write error!"); return ZAP_FAIL; } } @@ -1731,10 +1731,10 @@ zap_status_t zap_channel_write(zap_channel_t *zchan, void *data, zap_size_t data } } - if (zchan->fds[1]) { + if (zchan->fds[1] > -1) { int dlen = (int) *datalen; if ((write(zchan->fds[1], data, dlen)) != dlen) { - snprintf(zchan->last_error, sizeof(zchan->last_error), "write error!"); + snprintf(zchan->last_error, sizeof(zchan->last_error), "file write error!"); return ZAP_FAIL; } }