BIND 10 trac3088, updated. 13d812dc84b6967638efe30dd1dd1a34efcbfa80 [3088] Minor review fixes.
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Dec 17 16:39:57 UTC 2013
The branch, trac3088 has been updated
via 13d812dc84b6967638efe30dd1dd1a34efcbfa80 (commit)
from 59bd021c72b3e2d9538b534f3ba00ae4b410da62 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 13d812dc84b6967638efe30dd1dd1a34efcbfa80
Author: Thomas Markwalder <tmark at isc.org>
Date: Tue Dec 17 11:38:47 2013 -0500
[3088] Minor review fixes.
Fixed two missed minor cleanups from the initial review.
-----------------------------------------------------------------------
Summary of changes:
src/bin/d2/nc_trans.cc | 11 ++++-------
src/bin/d2/tests/nc_remove_unittests.cc | 8 ++++----
2 files changed, 8 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/d2/nc_trans.cc b/src/bin/d2/nc_trans.cc
index e264df5..1ad9b93 100644
--- a/src/bin/d2/nc_trans.cc
+++ b/src/bin/d2/nc_trans.cc
@@ -263,20 +263,17 @@ NameChangeTransaction::addLeaseAddressRdata(dns::RRsetPtr& rrset) {
try {
// Manufacture an RData from the lease address then add it to the RR.
+ dns::rdata::ConstRdataPtr rdata;
if (ncr_->isV4()) {
- dns::rdata::ConstRdataPtr rdata(new dns::rdata::in::
- A(ncr_->getIpAddress()));
- rrset->addRdata(rdata);
+ rdata.reset(new dns::rdata::in::A(ncr_->getIpAddress()));
} else {
- dns::rdata::ConstRdataPtr rdata(new dns::rdata::in::
- AAAA(ncr_->getIpAddress()));
- rrset->addRdata(rdata);
+ rdata.reset(new dns::rdata::in::AAAA(ncr_->getIpAddress()));
}
+ rrset->addRdata(rdata);
} catch (const std::exception& ex) {
isc_throw(NameChangeTransactionError, "Cannot add address rdata: "
<< ex.what());
}
-
}
void
diff --git a/src/bin/d2/tests/nc_remove_unittests.cc b/src/bin/d2/tests/nc_remove_unittests.cc
index 2f12feb..37efad6 100644
--- a/src/bin/d2/tests/nc_remove_unittests.cc
+++ b/src/bin/d2/tests/nc_remove_unittests.cc
@@ -96,7 +96,7 @@ public:
///
/// This method simulates the completion of a DNSClient send. This allows
/// the state handler logic devoted to dealing with IO completion to be
- /// fully exercise without requiring any actual IO. The two primary
+ /// fully exercised without requiring any actual IO. The two primary
/// pieces of information gleaned from IO completion are the DNSClient
/// status which indicates whether or not the IO exchange was successful
/// and the rcode, which indicates the server's reaction to the request.
@@ -292,13 +292,13 @@ TEST(NameRemoveTransaction, construction) {
// Verify that construction with wrong change type fails.
EXPECT_THROW(NameRemoveTransaction(io_service, ncr,
- forward_domain, reverse_domain),
- NameRemoveTransactionError);
+ forward_domain, reverse_domain),
+ NameRemoveTransactionError);
// Verify that a valid construction attempt works.
ncr->setChangeType(isc::dhcp_ddns::CHG_REMOVE);
EXPECT_NO_THROW(NameRemoveTransaction(io_service, ncr,
- forward_domain, reverse_domain));
+ forward_domain, reverse_domain));
}
/// @brief Tests event and state dictionary construction and verification.
More information about the bind10-changes
mailing list