summaryrefslogtreecommitdiff
path: root/src/plugins/fifo
diff options
context:
space:
mode:
authorRomero B. de S. Malaquias <romero.malaquias@gmail.com>2017-01-15 14:41:12 +0100
committerSébastien Helleu <flashcode@flashtux.org>2017-01-15 14:45:18 +0100
commit761ac58aa2c7688d08010bd4355c4130a4bbc102 (patch)
treeba672784c9b74241be4140d2f815b57a989b023d /src/plugins/fifo
parent9eafa1e461576bd1cb507fcfe91549ce6e9d0011 (diff)
downloadweechat-761ac58aa2c7688d08010bd4355c4130a4bbc102.zip
fifo: remove conditional directive breaking condition (closes #875)
Diffstat (limited to 'src/plugins/fifo')
-rw-r--r--src/plugins/fifo/fifo.c8
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,