]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix unused variable compiler warning 6324/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Mar 2018 15:25:35 +0000 (16:25 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Mar 2018 16:12:45 +0000 (17:12 +0100)
pdns/misc.cc

index 4bb8ae9c4bedd034e61cfa27fe0626597a319804..92d173f6a9ba9e294d8cd973c1e43c44d5a2b415 100644 (file)
@@ -380,12 +380,10 @@ int waitForMultiData(const set<int>& fds, const int seconds, const int useconds,
     return ret;
 
   set<int> 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<int>::const_iterator it(pollinFDs.begin());
   advance(it, random() % pollinFDs.size());