* Fix incorrect boolean logic in src/linux/read.c

(Credit: marcos69, closes #5)
This commit is contained in:
Mark Heily 2015-01-26 22:09:53 -05:00
parent b013ed1025
commit fd76168ac6
2 changed files with 4 additions and 1 deletions

View File

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

View File

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