diff options
-rw-r--r-- | src/plugins/fifo/fifo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c index aba0ada23..558b4e0c2 100644 --- a/src/plugins/fifo/fifo.c +++ b/src/plugins/fifo/fifo.c @@ -245,7 +245,7 @@ fifo_fd_cb (const void *pointer, void *data, int fd) { static char buffer[4096 + 2]; char *buf2, *pos, *ptr_buf, *next_ptr_buf; - int num_read; + int num_read, check_error; /* make C compiler happy */ (void) pointer; @@ -311,11 +311,11 @@ fifo_fd_cb (const void *pointer, void *data, int fd) { if (num_read < 0) { + check_error = (errno == EAGAIN); #ifdef __CYGWIN__ - if ((errno == EAGAIN) || (errno == ECOMM)) -#else - if (errno == EAGAIN) + check_error = check_error || (errno == ECOMM); #endif /* __CYGWIN__ */ + if (check_error) return WEECHAT_RC_OK; weechat_printf (NULL, |