]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/dnsdist-rings.cc
coverity: Fix paths from extracted tarball
[thirdparty/pdns.git] / pdns / dnsdist-rings.cc
index c1155653c45157fc154e43ee30b8bd4e3268da22..c7cb57d22bfb0b2e9fdd4a9341c2824a3e484d68 100644 (file)
@@ -25,7 +25,7 @@
 size_t Rings::numDistinctRequestors()
 {
   std::set<ComboAddress, ComboAddress::addressOnlyLessThan> s;
-  for (auto& shard : d_shards) {
+  for (const auto& shard : d_shards) {
     std::lock_guard<std::mutex> rl(shard->queryLock);
     for(const auto& q : shard->queryRing) {
       s.insert(q.requestor);
@@ -38,7 +38,7 @@ std::unordered_map<int, vector<boost::variant<string,double>>> Rings::getTopBand
 {
   map<ComboAddress, unsigned int, ComboAddress::addressOnlyLessThan> counts;
   uint64_t total=0;
-  for (auto& shard : d_shards) {
+  for (const auto& shard : d_shards) {
     {
       std::lock_guard<std::mutex> rl(shard->queryLock);
       for(const auto& q : shard->queryRing) {