Browse Source

[2218] editorial fixes: folded long lines, constify

JINMEI Tatuya 12 years ago
parent
commit
94f1fcdbcf
1 changed files with 12 additions and 12 deletions
  1. 12 12
      src/lib/datasrc/memory/zone_finder.cc

+ 12 - 12
src/lib/datasrc/memory/zone_finder.cc

@@ -658,7 +658,8 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
     const unsigned int qlabels = name.getLabelCount();
     const unsigned int qlabels = name.getLabelCount();
     const NSEC3Data* nsec3_data = zone_data_.getNSEC3Data();
     const NSEC3Data* nsec3_data = zone_data_.getNSEC3Data();
 
 
-    const ZoneNode* covering_node(NULL); // placeholder of the next closer proof
+    // placeholder of the next closer proof
+    const ZoneNode* covering_node(NULL);
     // Examine all names from the query name to the origin name, stripping
     // Examine all names from the query name to the origin name, stripping
     // the deepest label one by one, until we find a name that has a matching
     // the deepest label one by one, until we find a name that has a matching
     // NSEC3 hash.
     // NSEC3 hash.
@@ -678,20 +679,18 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
         ZoneNode* node(NULL);
         ZoneNode* node(NULL);
         ZoneChain chain;
         ZoneChain chain;
 
 
-        ZoneTree::Result result =
+        const ZoneTree::Result result =
             tree.find(Name(hlabel + "." + getOrigin().toText()), &node, chain);
             tree.find(Name(hlabel + "." + getOrigin().toText()), &node, chain);
 
 
         if (result == ZoneTree::EXACTMATCH) {
         if (result == ZoneTree::EXACTMATCH) {
             // We found an exact match.
             // We found an exact match.
             RdataSet* set = node->getData();
             RdataSet* set = node->getData();
-            ConstRRsetPtr closest = createTreeNodeRRset(node,
-                                                        set,
-                                                        getClass());
-            ConstRRsetPtr next = createTreeNodeRRset(covering_node,
-                                                     (covering_node != NULL ?
-                                                      covering_node->getData() :
-                                                      NULL),
-                                                     getClass());
+            ConstRRsetPtr closest = createTreeNodeRRset(node, set, getClass());
+            ConstRRsetPtr next =
+                createTreeNodeRRset(covering_node,
+                                    (covering_node != NULL ?
+                                     covering_node->getData() : NULL),
+                                    getClass());
 
 
             LOG_DEBUG(logger, DBG_TRACE_BASIC,
             LOG_DEBUG(logger, DBG_TRACE_BASIC,
                       DATASRC_MEM_FINDNSEC3_MATCH).arg(name).arg(labels).
                       DATASRC_MEM_FINDNSEC3_MATCH).arg(name).arg(labels).
@@ -709,8 +708,9 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
             const ZoneNode* next_node = last_node->successor();
             const ZoneNode* next_node = last_node->successor();
 
 
             // If the given hash is larger than the largest stored hash or
             // If the given hash is larger than the largest stored hash or
-            // the first label doesn't match the target, identify the "previous"
-            // hash value and remember it as the candidate next closer proof.
+            // the first label doesn't match the target, identify the
+            // "previous" hash value and remember it as the candidate next
+            // closer proof.
             if (((last_cmp.getOrder() < 0) && (previous_node == NULL)) ||
             if (((last_cmp.getOrder() < 0) && (previous_node == NULL)) ||
                 ((last_cmp.getOrder() > 0) && (next_node == NULL))) {
                 ((last_cmp.getOrder() > 0) && (next_node == NULL))) {
                 covering_node = last_node->getLargestInSubTree();
                 covering_node = last_node->getLargestInSubTree();