BIND 10 trac2784, updated. c7d8adb3fb0903c2b3a8627de14e85742f338d83 [2784] Addressed review comments.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Apr 9 11:21:51 UTC 2013


The branch, trac2784 has been updated
       via  c7d8adb3fb0903c2b3a8627de14e85742f338d83 (commit)
      from  2f3d1fe8c582c75c98b739e0f7b1486b0a9141ca (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 c7d8adb3fb0903c2b3a8627de14e85742f338d83
Author: Thomas Markwalder <tmark at isc.org>
Date:   Tue Apr 9 07:21:17 2013 -0400

    [2784] Addressed review comments.

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

Summary of changes:
 tests/tools/perfdhcp/test_control.cc |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/test_control.cc b/tests/tools/perfdhcp/test_control.cc
index 8762d49..6a327c6 100644
--- a/tests/tools/perfdhcp/test_control.cc
+++ b/tests/tools/perfdhcp/test_control.cc
@@ -592,21 +592,17 @@ TestControl::openSocket() const {
     std::string localname = options.getLocalName();
     std::string servername = options.getServerName();
     uint16_t port = options.getLocalPort();
-    uint8_t family = AF_INET;
     int sock = 0;
 
-    if (options.getIpVersion() == 6) {
-        family = AF_INET6;
-    }
-
+    uint8_t family = (options.getIpVersion() == 6) ? AF_NET6 : AF_INET; 
     IOAddress remoteaddr(servername);
     
-    // check for mismatch between ip option and server
-    if (family != remoteaddr.getFamily())
-    {
+    // Check for mismatch between ip option and server
+    if (family != remoteaddr.getFamily()) {
         isc_throw(InvalidParameter, 
-            "Values for Ip version: " <<  (unsigned int)options.getIpVersion()
-            <<  " and Server:" << servername << " are mismatched."); 
+                  "Values for Ip version: " <<  
+                  static_cast<unsigned int>options.getIpVersion()
+                  <<  " and Server:" << servername << " are mismatched."); 
     }
 
     if (port == 0) {



More information about the bind10-changes mailing list