BIND 10 trac805, updated. c836c770e7109302fa1a27d51ae2fec573c03cb5 [805] a few minor cleanups: typo; position of catch; eliminating an unnecessary temporary variable.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Jan 4 23:45:23 UTC 2012


The branch, trac805 has been updated
       via  c836c770e7109302fa1a27d51ae2fec573c03cb5 (commit)
       via  4fdec3477a07431fadd2f36a68504038a0a78323 (commit)
       via  78b0456c73d95d4a3d4a0c702aedd2c547404107 (commit)
       via  3fcadc1a85ca56620c418e8b18cf43e43afbe98d (commit)
      from  9d4ae52d559448299b5561bd0d76930c2be2275b (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 c836c770e7109302fa1a27d51ae2fec573c03cb5
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 4 15:41:12 2012 -0800

    [805] a few minor cleanups: typo; position of catch; eliminating an unnecessary
    temporary variable.

commit 4fdec3477a07431fadd2f36a68504038a0a78323
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 4 15:40:36 2012 -0800

    [805] comment update: clarified return vs release to be consistent with the
    other comment on this point.

commit 78b0456c73d95d4a3d4a0c702aedd2c547404107
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 4 15:29:59 2012 -0800

    [805] a minor style fix: distinguish false and NULL

commit 3fcadc1a85ca56620c418e8b18cf43e43afbe98d
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Jan 4 15:24:43 2012 -0800

    [805] recovered missing condition check; a minor style fix (folded a long line)

-----------------------------------------------------------------------

Summary of changes:
 src/lib/asiodns/tests/dns_server_unittest.cc       |    4 ++--
 src/lib/asiodns/udp_server.cc                      |    6 +++---
 src/lib/server_common/portconfig.cc                |    8 +++-----
 src/lib/server_common/tests/portconfig_unittest.cc |    2 +-
 4 files changed, 9 insertions(+), 11 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/asiodns/tests/dns_server_unittest.cc b/src/lib/asiodns/tests/dns_server_unittest.cc
index 1272de1..0e517ec 100644
--- a/src/lib/asiodns/tests/dns_server_unittest.cc
+++ b/src/lib/asiodns/tests/dns_server_unittest.cc
@@ -338,10 +338,10 @@ class DNSServerTestBase : public::testing::Test {
         }
 
         ~ DNSServerTestBase() {
-            if (udp_server_) {
+            if (udp_server_ != NULL) {
                 udp_server_->stop();
             }
-            if (tcp_server_) {
+            if (tcp_server_ != NULL) {
                 tcp_server_->stop();
             }
             delete checker_;
diff --git a/src/lib/asiodns/udp_server.cc b/src/lib/asiodns/udp_server.cc
index 001fdd5..b8519d3 100644
--- a/src/lib/asiodns/udp_server.cc
+++ b/src/lib/asiodns/udp_server.cc
@@ -88,10 +88,10 @@ struct UDPServer::Data {
         LOG_DEBUG(logger, DBGLVL_TRACE_BASIC, ASIODNS_FD_ADD_UDP).arg(fd);
         try {
             socket_.reset(new udp::socket(io_service));
-            socket_->assign(AF_INET6 ? udp::v6() : udp::v4(), fd);
+            socket_->assign(af == AF_INET6 ? udp::v6() : udp::v4(), fd);
         } catch (const std::exception& exception) {
-            // Whatever the thing throws, it is something from ASIO and we convert
-            // it
+            // Whatever the thing throws, it is something from ASIO and we
+            // convert it
             isc_throw(IOError, exception.what());
         }
     }
diff --git a/src/lib/server_common/portconfig.cc b/src/lib/server_common/portconfig.cc
index 2b6e4ec..6ee1ae4 100644
--- a/src/lib/server_common/portconfig.cc
+++ b/src/lib/server_common/portconfig.cc
@@ -153,14 +153,12 @@ installListenAddresses(const AddressList& newAddresses,
         LOG_ERROR(logger, SRVCOMM_ADDRESS_FAIL).arg(e.what());
         try {
             setAddresses(service, addressStore);
-        }
-        catch (const exception& e2) {
+        } catch (const exception& e2) {
             LOG_FATAL(logger, SRVCOMM_ADDRESS_UNRECOVERABLE).arg(e2.what());
-            // If we can't set the new ones, nor the old ones, at last
+            // If we can't set the new ones, nor the old ones, at least
             // releasing everything should work. If it doesn't, there isn't
             // anything else we could do.
-            AddressList empty;
-            setAddresses(service, empty);
+            setAddresses(service, AddressList());
             addressStore.clear();
         }
         //Anyway the new configure has problem, we need to notify configure
diff --git a/src/lib/server_common/tests/portconfig_unittest.cc b/src/lib/server_common/tests/portconfig_unittest.cc
index 1cf3e20..ee17e56 100644
--- a/src/lib/server_common/tests/portconfig_unittest.cc
+++ b/src/lib/server_common/tests/portconfig_unittest.cc
@@ -277,7 +277,7 @@ TEST_F(InstallListenAddresses, brokenRollback) {
         "UDP:127.0.0.1:5288:8",
         NULL
     };
-    // The first set should be returned, as well as all the ones we request now
+    // The first set should be released, as well as all the ones we request now
     const char* released[] = {
         "TCP:127.0.0.1:5288:1",
         "UDP:127.0.0.1:5288:2",




More information about the bind10-changes mailing list