From aca9c605596887e0ec7684bc327219502ac97512 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 5 Mar 2018 16:25:35 +0100 Subject: [PATCH] Fix unused variable compiler warning --- pdns/misc.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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()); -- 2.47.2