From: Mukund Sivaraman Date: Fri, 14 Feb 2014 13:35:01 +0000 (+0530) Subject: [2430] Rename variables to match BIND 9 ARM documentation X-Git-Tag: bind10-1.2.0beta1-release~50^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4df951747393f5e59babd70ecba190b6dcb2fd74;p=thirdparty%2Fkea.git [2430] Rename variables to match BIND 9 ARM documentation --- diff --git a/src/lib/dns/master_loader.cc b/src/lib/dns/master_loader.cc index d5979feb5b..6073125990 100644 --- a/src/lib/dns/master_loader.cc +++ b/src/lib/dns/master_loader.cc @@ -498,30 +498,30 @@ MasterLoader::MasterLoaderImpl::generateForIter(const std::string& str, } else { const char* scan_str = str.c_str() + std::distance(str.begin(), it); - int delta = 0; + int offset = 0; unsigned int width; - char mode[2] = {'d', 0}; // char plus null byte + char base[2] = {'d', 0}; // char plus null byte const int n = sscanf(scan_str, "{%d,%u,%1[doxXnN]}", - &delta, &width, mode); + &offset, &width, base); switch (n) { case 1: - rstr += boost::str(boost::format("%d") % (i + delta)); + rstr += boost::str(boost::format("%d") % (i + offset)); break; case 2: { const std::string fmt = boost::str(boost::format("%%0%ud") % width); - rstr += boost::str(boost::format(fmt) % (i + delta)); + rstr += boost::str(boost::format(fmt) % (i + offset)); break; } case 3: - if ((mode[0] == 'n') || (mode[0] == 'N')) { - rstr += genNibbles(i + delta, width, (mode[0] == 'N')); + if ((base[0] == 'n') || (base[0] == 'N')) { + rstr += genNibbles(i + offset, width, (base[0] == 'N')); } else { const std::string fmt = - boost::str(boost::format("%%0%u%c") % width % mode[0]); - rstr += boost::str(boost::format(fmt) % (i + delta)); + boost::str(boost::format("%%0%u%c") % width % base[0]); + rstr += boost::str(boost::format(fmt) % (i + offset)); } break;