]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2292] minor cleanups: constify, indentation
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 8 Oct 2012 18:32:18 +0000 (11:32 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Thu, 11 Oct 2012 17:04:35 +0000 (10:04 -0700)
src/lib/datasrc/memory/memory_client.cc
src/lib/datasrc/tests/memory/domaintree_unittest.cc

index de953ca10738114230e5c13cc4e5ed5efd1560d6..a5824fa63bcb0f766430e03586ef6741921d7219 100644 (file)
@@ -627,11 +627,11 @@ InMemoryClient::InMemoryClientImpl::load(
     // node must point to a valid node now
     assert(node != NULL);
 
-    std::string* tstr = node->setData(new std::string(filename));
+    const std::string* tstr = node->setData(new std::string(filename));
     delete tstr;
 
-    result::Result result(zone_table_->addZone(mem_sgmt_, rrclass_,
-                                               zone_name, holder));
+    const result::Result result(zone_table_->addZone(mem_sgmt_, rrclass_,
+                                                     zone_name, holder));
     if (result == result::SUCCESS) {
         // Only increment the zone count if the zone doesn't already
         // exist.
@@ -726,8 +726,8 @@ InMemoryClient::load(const isc::dns::Name& zone_name,
 const std::string
 InMemoryClient::getFileName(const isc::dns::Name& zone_name) const {
     const FileNameNode* node(NULL);
-    FileNameTree::Result result = impl_->file_name_tree_->find(zone_name,
-                                                               &node);
+    const FileNameTree::Result result = impl_->file_name_tree_->find(zone_name,
+                                                                     &node);
     if (result == FileNameTree::EXACTMATCH) {
         return (*node->getData());
     } else {
index 3754139620c1cdeaac89a16c2d5944eae0eba8dd..81fa576b21b4162d2ef430aa99f5453fc5fb6942 100644 (file)
@@ -414,7 +414,7 @@ performCallbackTest(TestDomainTree& dtree,
     // "cdtnode" may be invalid due to the insertion, so we need to re-find
     // it.
     EXPECT_EQ(TestDomainTree::EXACTMATCH, dtree.find(Name("callback.example"),
-                                                   &cdtnode));
+                                                     &cdtnode));
     EXPECT_TRUE(cdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
     EXPECT_FALSE(subdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));
     EXPECT_FALSE(parentdtnode->getFlag(TestDomainTreeNode::FLAG_CALLBACK));