]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2218] editorial fixes: folded long lines, constify
authorJINMEI Tatuya <jinmei@isc.org>
Thu, 20 Sep 2012 05:55:50 +0000 (22:55 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 20 Sep 2012 05:55:50 +0000 (22:55 -0700)
src/lib/datasrc/memory/zone_finder.cc

index 9221c911b6f75f7a8b0cf1edca1732fbc79724e4..e5785c8151d6486bdd7f3d045d3274ab7b7b05c1 100644 (file)
@@ -658,7 +658,8 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
     const unsigned int qlabels = name.getLabelCount();
     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
     // the deepest label one by one, until we find a name that has a matching
     // NSEC3 hash.
@@ -678,20 +679,18 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
         ZoneNode* node(NULL);
         ZoneChain chain;
 
-        ZoneTree::Result result =
+        const ZoneTree::Result result =
             tree.find(Name(hlabel + "." + getOrigin().toText()), &node, chain);
 
         if (result == ZoneTree::EXACTMATCH) {
             // We found an exact match.
             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,
                       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();
 
             // 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)) ||
                 ((last_cmp.getOrder() > 0) && (next_node == NULL))) {
                 covering_node = last_node->getLargestInSubTree();