]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1792] unrelated cleanup: constify and fold a long line
authorJINMEI Tatuya <jinmei@isc.org>
Fri, 6 Apr 2012 04:34:01 +0000 (21:34 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Fri, 6 Apr 2012 04:34:01 +0000 (21:34 -0700)
just noticed them and the changes are small, so I did it here.

src/lib/datasrc/sqlite3_accessor_link.cc

index 81ac6b5bc224743774de441a3c687c5ce2e73283..c064e0f2e3417f608a358ff7bb67fadeb6d6c5b9 100644 (file)
@@ -82,13 +82,15 @@ createInstance(isc::data::ConstElementPtr config, std::string& error) {
         error = "Configuration error: " + errors->str();
         return (NULL);
     }
-    std::string dbfile = config->get(CONFIG_ITEM_DATABASE_FILE)->stringValue();
+    const std::string dbfile =
+        config->get(CONFIG_ITEM_DATABASE_FILE)->stringValue();
     try {
         boost::shared_ptr<DatabaseAccessor> sqlite3_accessor(
             new SQLite3Accessor(dbfile, "IN")); // XXX: avoid hardcode RR class
         return (new DatabaseClient(isc::dns::RRClass::IN(), sqlite3_accessor));
     } catch (const std::exception& exc) {
-        error = std::string("Error creating sqlite3 datasource: ") + exc.what();
+        error = std::string("Error creating sqlite3 datasource: ") +
+            exc.what();
         return (NULL);
     } catch (...) {
         error = std::string("Error creating sqlite3 datasource, "