]> arthur.barton.de Git - netatalk.git/commitdiff
Convert to more readable error checking
authorFrank Lahm <franklahm@googlemail.com>
Wed, 25 Jul 2012 09:20:44 +0000 (11:20 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 25 Jul 2012 09:20:44 +0000 (11:20 +0200)
libatalk/dsi/dsi_stream.c

index 98c9396f77cb58157867b907b0082618b2d9e1a8..c130eb90a33fb40b70776363a2d8f5a48c8da453 100644 (file)
@@ -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;
               }
           }