BIND 10 trac1207, updated. 34561bdb8ee2ec934df4ff957839cd4e7d53e7be [1207] editorial/style nits: indentation/brace pos/constify/() for return

BIND 10 source code commits bind10-changes at lists.isc.org
Tue May 15 01:20:54 UTC 2012


The branch, trac1207 has been updated
       via  34561bdb8ee2ec934df4ff957839cd4e7d53e7be (commit)
      from  c17d922ffe421fbbcbffab695cfeb01cdc316bca (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 34561bdb8ee2ec934df4ff957839cd4e7d53e7be
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Mon May 14 18:19:46 2012 -0700

    [1207] editorial/style nits: indentation/brace pos/constify/() for return

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

Summary of changes:
 src/bin/auth/auth_config.cc             |    2 +-
 src/bin/auth/auth_srv.cc                |    4 ++--
 src/bin/auth/auth_srv.h                 |    2 +-
 src/bin/auth/tests/auth_srv_unittest.cc |    4 ++--
 src/lib/datasrc/memory_datasrc_link.cc  |   13 +++++++------
 5 files changed, 13 insertions(+), 12 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_config.cc b/src/bin/auth/auth_config.cc
index afb606d..f87fe65 100644
--- a/src/bin/auth/auth_config.cc
+++ b/src/bin/auth/auth_config.cc
@@ -109,7 +109,7 @@ DatasourcesConfig::commit() {
     // data source types, and should eventually be improved.
     // Currently memory data source for class IN is the only possibility.
     server_.setInMemoryClient(RRClass::IN(),
-        isc::datasrc::DataSourceClientContainerPtr());
+                              isc::datasrc::DataSourceClientContainerPtr());
 
     BOOST_FOREACH(boost::shared_ptr<AuthConfigParser> datasrc_config,
                   datasources_) {
diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc
index 898a126..b64e835 100644
--- a/src/bin/auth/auth_srv.cc
+++ b/src/bin/auth/auth_srv.cc
@@ -409,14 +409,14 @@ AuthSrv::getInMemoryClient(const RRClass& rrclass) {
 }
 
 bool
-AuthSrv::hasInMemoryClient() {
+AuthSrv::hasInMemoryClient() const {
     return (impl_->memory_client_container_ !=
             isc::datasrc::DataSourceClientContainerPtr());
 }
 
 void
 AuthSrv::setInMemoryClient(const isc::dns::RRClass& rrclass,
-    isc::datasrc::DataSourceClientContainerPtr memory_client)
+                           DataSourceClientContainerPtr memory_client)
 {
     if (rrclass != impl_->memory_client_class_) {
         isc_throw(InvalidParameter,
diff --git a/src/bin/auth/auth_srv.h b/src/bin/auth/auth_srv.h
index 893421e..0f01a10 100644
--- a/src/bin/auth/auth_srv.h
+++ b/src/bin/auth/auth_srv.h
@@ -276,7 +276,7 @@ public:
     /// multi-data-source framework is completed.
     ///
     /// \return True if the in-memory datasource has been set.
-    bool hasInMemoryClient();
+    bool hasInMemoryClient() const;
 
     /// Sets or replaces the in-memory data source of the specified RR class.
     ///
diff --git a/src/bin/auth/tests/auth_srv_unittest.cc b/src/bin/auth/tests/auth_srv_unittest.cc
index c7f08be..f731dd1 100644
--- a/src/bin/auth/tests/auth_srv_unittest.cc
+++ b/src/bin/auth/tests/auth_srv_unittest.cc
@@ -1256,7 +1256,7 @@ public:
     }
 
 private:
-    isc::datasrc::DataSourceClientContainerPtr real_client_ptr_;
+    const isc::datasrc::DataSourceClientContainerPtr real_client_ptr_;
     ThrowWhen throw_when_;
     bool isc_exception_;
     ConstRRsetPtr fake_rrset_;
@@ -1286,7 +1286,7 @@ public:
     }
 
 private:
-    isc::datasrc::DataSourceClient* client_;
+    isc::datasrc::DataSourceClient* const client_;
 };
 
 } // end anonymous namespace for throwing proxy classes
diff --git a/src/lib/datasrc/memory_datasrc_link.cc b/src/lib/datasrc/memory_datasrc_link.cc
index 11e6ef0..d5a3f85 100644
--- a/src/lib/datasrc/memory_datasrc_link.cc
+++ b/src/lib/datasrc/memory_datasrc_link.cc
@@ -59,14 +59,14 @@ checkConfigElementString(ConstElementPtr config, const std::string& name,
                  "Config for memory backend does not contain a '"
                  +name+
                  "' value");
-        return false;
+        return (false);
     } else if (!config->get(name) ||
                config->get(name)->getType() != Element::string) {
         addError(errors, "value of " + name +
                  " in memory backend config is not a string");
-        return false;
+        return (false);
     } else {
-        return true;
+        return (true);
     }
 }
 
@@ -162,7 +162,8 @@ checkConfig(ConstElementPtr config, ElementPtr errors) {
 // checked by the caller
 void
 applyConfig(isc::datasrc::InMemoryClient* client,
-            isc::data::ConstElementPtr config_value) {
+            isc::data::ConstElementPtr config_value)
+{
     ConstElementPtr zones_config = config_value->get("zones");
     if (!zones_config) {
         // XXX: Like the RR class, we cannot retrieve the default value here,
@@ -253,8 +254,8 @@ createInstance(isc::data::ConstElementPtr config, std::string& error) {
     try {
         client = new isc::datasrc::InMemoryClient();
         applyConfig(client, config);
-        return client;
-    } catch (isc::Exception& isce) {
+        return (client);
+    } catch (const isc::Exception& isce) {
         delete client;
         error = isce.what();
         return (NULL);



More information about the bind10-changes mailing list