Browse Source

[1292] trivial editorial/style fixes

JINMEI Tatuya 13 years ago
parent
commit
75fc581760
2 changed files with 5 additions and 6 deletions
  1. 5 5
      src/lib/datasrc/factory.cc
  2. 0 1
      src/lib/datasrc/tests/Makefile.am

+ 5 - 5
src/lib/datasrc/factory.cc

@@ -36,7 +36,8 @@ namespace {
 // I.e. it will add '_ds.so' (if necessary), and prepend
 // it with an absolute path (if necessary).
 // Returns the resulting string to use with LibraryContainer.
-const std::string getDataSourceLibFile(std::string type) {
+const std::string
+getDataSourceLibFile(const std::string& type) {
     std::string lib_file = type;
     if (type.length() == 0) {
         isc_throw(DataSourceError,
@@ -46,8 +47,7 @@ const std::string getDataSourceLibFile(std::string type) {
     // Type can be either a short name, in which case we need to
     // append "_ds.so", or it can be a direct .so module.
     const int ext_pos = lib_file.rfind(".so");
-    if (ext_pos == std::string::npos ||
-        ext_pos + 3 != lib_file.length()) {
+    if (ext_pos == std::string::npos || ext_pos + 3 != lib_file.length()) {
         lib_file.append("_ds.so");
     }
     // And if it is not an absolute path, prepend it with our
@@ -55,14 +55,14 @@ const std::string getDataSourceLibFile(std::string type) {
     if (type[0] != '/') {
         // When running from the build tree, we do NOT want
         // to load the installed module
-        if (getenv("B10_FROM_BUILD")) {
+        if (getenv("B10_FROM_BUILD") != NULL) {
             lib_file = std::string(getenv("B10_FROM_BUILD")) +
                        "/src/lib/datasrc/.libs/" + lib_file;
         } else {
             lib_file = MODULE_PATH + lib_file;
         }
     }
-    return lib_file;
+    return (lib_file);
 }
 } // end anonymous namespace
 

+ 0 - 1
src/lib/datasrc/tests/Makefile.am

@@ -124,4 +124,3 @@ run_unittests_factory_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)
 run_unittests_factory_LDADD = $(common_ldadd)
 check-local:
 	B10_FROM_BUILD=${abs_top_builddir} ./run_unittests_factory
-