From: bert hubert Date: Thu, 26 Nov 2015 19:17:50 +0000 (+0100) Subject: prevent a storm of string copies just for getting the minTTL of a packet X-Git-Tag: dnsdist-1.0.0-alpha1~176^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=822c865ffeacc8ea0f242395a3a290f3d94472f9;p=pdns prevent a storm of string copies just for getting the minTTL of a packet --- diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index 1c330446a..8c693323e 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -252,7 +252,7 @@ bool DNSPacket::couldBeCached() unsigned int DNSPacket::getMinTTL() { unsigned int minttl = UINT_MAX; - BOOST_FOREACH(DNSResourceRecord rr, d_rrs) { + for(const DNSResourceRecord& rr : d_rrs) { if (rr.ttl < minttl) minttl = rr.ttl; }