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);