]> granicus.if.org Git - pdns/commitdiff
tcpreceiver: fix easy cases of var shadowing
authorChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 7 Oct 2016 00:42:29 +0000 (02:42 +0200)
committerChristian Hofstaedtler <christian.hofstaedtler@deduktiva.com>
Fri, 7 Oct 2016 00:42:29 +0000 (02:42 +0200)
pdns/tcpreceiver.cc

index 767fda8cbac16841fa6083c9d1899d21692dec64..14a4e624fad9ff5ee2a553711cb6528ecd53a8fb 100644 (file)
@@ -320,12 +320,12 @@ void *TCPNameserver::doConnection(void *data)
       shared_ptr<DNSPacket> reply; 
       shared_ptr<DNSPacket> cached= shared_ptr<DNSPacket>(new DNSPacket);
       if(logDNSQueries)  {
-        string remote;
-        if(packet->hasEDNSSubnet()) 
-          remote = packet->getRemote().toString() + "<-" + packet->getRealRemote().toString();
+        string remote_text;
+        if(packet->hasEDNSSubnet())
+          remote_text = packet->getRemote().toString() + "<-" + packet->getRealRemote().toString();
         else
-          remote = packet->getRemote().toString();
-        L << Logger::Notice<<"TCP Remote "<< remote <<" wants '" << packet->qdomain<<"|"<<packet->qtype.getName() << 
+          remote_text = packet->getRemote().toString();
+        L << Logger::Notice<<"TCP Remote "<< remote_text <<" wants '" << packet->qdomain<<"|"<<packet->qtype.getName() <<
         "', do = " <<packet->d_dnssecOk <<", bufsize = "<< packet->getMaxReplyLen()<<": ";
       }
 
@@ -737,11 +737,11 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr<DNSPacket> q, int ou
   vector<DNSZoneRecord> zrrs;
 
   // Add the CDNSKEY and CDS records we created earlier
-  for (auto const &zrr : cds)
-    zrrs.push_back(zrr);
+  for (auto const &synth_zrr : cds)
+    zrrs.push_back(synth_zrr);
 
-  for (auto const &zrr : cdnskey)
-    zrrs.push_back(zrr);
+  for (auto const &synth_zrr : cdnskey)
+    zrrs.push_back(synth_zrr);
 
   while(sd.db->get(zrr)) {
     if(zrr.dr.d_name.isPartOf(target)) {