BIND 10 trac1596, updated. 308d0c39eade6985c4f61feb215255cf2ec92abf [1596] constify

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Feb 9 01:38:45 UTC 2012


The branch, trac1596 has been updated
       via  308d0c39eade6985c4f61feb215255cf2ec92abf (commit)
      from  f5ea0617661d39ecd576f3d997cf20009ac05048 (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 308d0c39eade6985c4f61feb215255cf2ec92abf
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Wed Feb 8 17:38:36 2012 -0800

    [1596] constify

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

Summary of changes:
 src/bin/auth/command.cc                |    4 ++--
 src/bin/auth/tests/command_unittest.cc |    2 +-
 src/bin/resolver/main.cc               |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/command.cc b/src/bin/auth/command.cc
index b1cc2ee..820596a 100644
--- a/src/bin/auth/command.cc
+++ b/src/bin/auth/command.cc
@@ -116,8 +116,8 @@ public:
         if (args && args->getType() ==
             isc::data::Element::map && args->contains("pid")) {
             // If it is, we check it is the same as our PID
-            int pid(args->get("pid")->intValue());
-            pid_t my_pid(getpid());
+            const int pid(args->get("pid")->intValue());
+            const pid_t my_pid(getpid());
             if (my_pid != pid) {
                 // It is not for us
                 return;
diff --git a/src/bin/auth/tests/command_unittest.cc b/src/bin/auth/tests/command_unittest.cc
index d14ff6b..9eaf281 100644
--- a/src/bin/auth/tests/command_unittest.cc
+++ b/src/bin/auth/tests/command_unittest.cc
@@ -117,7 +117,7 @@ TEST_F(AuthCommandTest, shutdown) {
 
 TEST_F(AuthCommandTest, shutdownCorrectPID) {
     // Put the pid parameter there
-    pid_t pid(getpid());
+    const pid_t pid(getpid());
     ElementPtr param(new isc::data::MapElement());
     param->set("pid", ConstElementPtr(new isc::data::IntElement(pid)));
     this->param = param;
diff --git a/src/bin/resolver/main.cc b/src/bin/resolver/main.cc
index c479759..eed3378 100644
--- a/src/bin/resolver/main.cc
+++ b/src/bin/resolver/main.cc
@@ -90,8 +90,8 @@ my_command_handler(const string& command, ConstElementPtr args) {
         if (args && args->getType() ==
             isc::data::Element::map && args->contains("pid")) {
             // If it is, we check it is the same as our PID
-            int pid(args->get("pid")->intValue());
-            pid_t my_pid(getpid());
+            const int pid(args->get("pid")->intValue());
+            const pid_t my_pid(getpid());
             if (my_pid != pid) {
                 // It is not for us
                 return (answer);




More information about the bind10-changes mailing list