From fd76168ac6018d5ae99ce9778ba1ef4de524b632 Mon Sep 17 00:00:00 2001 From: Mark Heily Date: Mon, 26 Jan 2015 22:09:53 -0500 Subject: [PATCH] * Fix incorrect boolean logic in src/linux/read.c (Credit: marcos69, closes #5) --- ChangeLog | 3 +++ src/linux/read.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b87771e..fb7baba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ UNRELEASED HEAD ------------------------------------------------------------------------ + * Fix incorrect boolean logic in src/linux/read.c + (Credit: marcos69, closes #5) + * Fix a build failure on mips64el. (Credit: YunQiang Su, from Debian Bug #754376) diff --git a/src/linux/read.c b/src/linux/read.c index 2102631..aa677ae 100644 --- a/src/linux/read.c +++ b/src/linux/read.c @@ -204,7 +204,7 @@ evfilt_read_knote_delete(struct filter *filt, struct knote *kn) if (kn->kev.flags & EV_DISABLE) return (0); - if ((kn->kn_flags & KNFL_REGULAR_FILE && kn->kdata.kn_eventfd != -1) < 0) { + if ((kn->kn_flags & KNFL_REGULAR_FILE) && (kn->kdata.kn_eventfd != -1)) { if (epoll_ctl(kn->kn_epollfd, EPOLL_CTL_DEL, kn->kdata.kn_eventfd, NULL) < 0) { dbg_perror("epoll_ctl(2)"); return (-1);