From 88436a544d0c87299a3417432b15e897f1ea15ec Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Wed, 25 Jul 2012 11:20:44 +0200 Subject: [PATCH] Convert to more readable error checking --- libatalk/dsi/dsi_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libatalk/dsi/dsi_stream.c b/libatalk/dsi/dsi_stream.c index 98c9396f..c130eb90 100644 --- a/libatalk/dsi/dsi_stream.c +++ b/libatalk/dsi/dsi_stream.c @@ -400,7 +400,7 @@ ssize_t dsi_stream_read_file(DSI *dsi, const int fromfd, off_t offset, const siz #endif /* defined(SOLARIS) || defined(FREEBSD) */ #endif /* HAVE_SENDFILEV */ - if (dsi_peek(dsi)) { + if (dsi_peek(dsi) != 0) { ret = -1; goto exit; } @@ -533,7 +533,7 @@ int dsi_stream_send(DSI *dsi, void *buf, size_t length) break; else if (len < 0) { /* error */ if (errno == EAGAIN || errno == EWOULDBLOCK) { - if (!dsi_peek(dsi)) { + if (dsi_peek(dsi) != 0) { continue; } } -- 2.39.2