From: Peter van Dijk Date: Mon, 8 Apr 2019 12:57:29 +0000 (+0200) Subject: cleanup poll event bitmask vs. value usage in two more places X-Git-Tag: dnsdist-1.4.0-alpha1~13^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c1ee10a6c29d2eede49bf214b80a08d29ae05fc8;p=thirdparty%2Fpdns.git cleanup poll event bitmask vs. value usage in two more places --- diff --git a/pdns/pollmplexer.cc b/pdns/pollmplexer.cc index edf53e45ee..399ad132ae 100644 --- a/pdns/pollmplexer.cc +++ b/pdns/pollmplexer.cc @@ -104,7 +104,7 @@ void PollFDMultiplexer::getAvailableFDs(std::vector& fds, int timeout) throw FDMultiplexerException("poll returned error: " + stringerror()); for(const auto& pollfd : pollfds) { - if (pollfd.revents == POLLIN || pollfd.revents == POLLOUT) { + if (pollfd.revents & POLLIN || pollfd.revents & POLLOUT) { fds.push_back(pollfd.fd); } } diff --git a/pdns/tcpreceiver.cc b/pdns/tcpreceiver.cc index 706305c87a..9c0a7b80c1 100644 --- a/pdns/tcpreceiver.cc +++ b/pdns/tcpreceiver.cc @@ -1352,7 +1352,7 @@ void TCPNameserver::thread() int sock=-1; for(const pollfd& pfd : d_prfds) { - if(pfd.revents == POLLIN) { + if(pfd.revents & POLLIN) { sock = pfd.fd; remote.sin4.sin_family = AF_INET6; addrlen=remote.getSocklen();