Commit 7b2aa97d authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2292] minor cleanups: constify, indentation

parent e84770a8
......@@ -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 {
......
......@@ -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));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment