]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
nsecrecords.cc: Fix shadowing variables
authorAki Tuomi <cmouse@cmouse.fi>
Sat, 19 Oct 2019 14:45:18 +0000 (17:45 +0300)
committerAki Tuomi <cmouse@cmouse.fi>
Tue, 29 Oct 2019 10:03:12 +0000 (12:03 +0200)
nsecrecords.cc:79:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow]
nsecrecords.cc:141:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow]

pdns/nsecrecords.cc

index 21e6d13da1ce9eacf83f80b6515a895229e39072..dc97e3bf48723d04c7fcbd0c1b54a1d2e33aff9d 100644 (file)
@@ -76,9 +76,9 @@ void NSECBitmap::toPacket(DNSPacketWriter& pw)
 {
   NSECBitmapGenerator nbg(pw);
   if (d_bitset) {
-    size_t count = d_bitset->count();
     size_t found = 0;
-    for(size_t idx = 0; idx < nbTypes && found < count; ++idx){
+    size_t l_count = d_bitset->count();
+    for(size_t idx = 0; idx < nbTypes && found < l_count; ++idx){
       if (!d_bitset->test(idx)) {
         continue;
       }
@@ -138,9 +138,9 @@ string NSECBitmap::getZoneRepresentation() const
   string ret;
 
   if (d_bitset) {
-    size_t count = d_bitset->count();
     size_t found = 0;
-    for(size_t idx = 0; idx < nbTypes && found < count; ++idx) {
+    size_t l_count = d_bitset->count();
+    for(size_t idx = 0; idx < nbTypes && found < l_count; ++idx) {
       if (!d_bitset->test(idx)) {
         continue;
       }