From: Pieter Lexis Date: Mon, 5 Mar 2018 15:25:35 +0000 (+0100) Subject: Fix unused variable compiler warning X-Git-Tag: dnsdist-1.3.0~61^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6324%2Fhead;p=thirdparty%2Fpdns.git Fix unused variable compiler warning --- diff --git a/pdns/misc.cc b/pdns/misc.cc index 4bb8ae9c4b..92d173f6a9 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -380,12 +380,10 @@ int waitForMultiData(const set& fds, const int seconds, const int useconds, return ret; set pollinFDs; - ctr = 0; - for (const auto& fd : realFDs) { - if (pfds[ctr].revents & POLLIN) { - pollinFDs.insert(pfds[ctr].fd); + for (const auto& pfd : pfds) { + if (pfd.revents & POLLIN) { + pollinFDs.insert(pfd.fd); } - ctr++; } set::const_iterator it(pollinFDs.begin()); advance(it, random() % pollinFDs.size());