Parcourir la source

style fixes:
- added surrandong parentheses for return values based on agreed guideline
- removed redundant semicolons after a block
- fixed curly brace position

diff is large, but the change is very trivial. so I'm skipping explicit review.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2745 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya il y a 14 ans
Parent
commit
81eb4c244c
44 fichiers modifiés avec 280 ajouts et 301 suppressions
  1. 1 1
      src/bin/auth/asio_link.cc
  2. 2 2
      src/bin/auth/auth_srv.cc
  3. 2 2
      src/bin/auth/main.cc
  4. 84 88
      src/lib/cc/data.cc
  5. 26 26
      src/lib/cc/data.h
  6. 7 8
      src/lib/cc/session.cc
  7. 1 1
      src/lib/cc/tests/data_unittests.cc
  8. 21 27
      src/lib/config/ccsession.cc
  9. 7 9
      src/lib/config/config_data.cc
  10. 2 2
      src/lib/config/config_data.h
  11. 38 41
      src/lib/config/module_spec.cc
  12. 2 2
      src/lib/config/module_spec.h
  13. 9 9
      src/lib/config/tests/ccsession_unittests.cc
  14. 2 3
      src/lib/config/tests/config_data_unittests.cc
  15. 7 7
      src/lib/config/tests/fake_session.cc
  16. 4 5
      src/lib/config/tests/module_spec_unittests.cc
  17. 1 1
      src/lib/datasrc/data_source.cc
  18. 4 4
      src/lib/datasrc/data_source.h
  19. 1 1
      src/lib/datasrc/sqlite3_datasrc.h
  20. 1 1
      src/lib/datasrc/static_datasrc.cc
  21. 1 1
      src/lib/datasrc/tests/test_datasrc.cc
  22. 1 1
      src/lib/dns/name.h
  23. 10 10
      src/lib/dns/python/message_python.cc
  24. 2 2
      src/lib/dns/python/messagerenderer_python.cc
  25. 2 2
      src/lib/dns/python/name_python.cc
  26. 2 2
      src/lib/dns/python/question_python.cc
  27. 2 2
      src/lib/dns/python/rdata_python.cc
  28. 2 2
      src/lib/dns/python/rrclass_python.cc
  29. 2 2
      src/lib/dns/python/rrset_python.cc
  30. 2 2
      src/lib/dns/python/rrttl_python.cc
  31. 2 2
      src/lib/dns/python/rrtype_python.cc
  32. 1 1
      src/lib/dns/rdata/generic/ds_43.cc
  33. 4 4
      src/lib/dns/rdata/generic/nsec3_50.cc
  34. 2 2
      src/lib/dns/rrsetlist.cc
  35. 2 2
      src/lib/dns/rrtype-placeholder.h
  36. 3 3
      src/lib/dns/tests/rrparamregistry_unittest.cc
  37. 2 2
      src/lib/dns/tests/unittest_util.cc
  38. 1 1
      src/lib/dns/util/base16_from_binary.h
  39. 1 1
      src/lib/dns/util/base32hex_from_binary.h
  40. 1 1
      src/lib/dns/util/binary_from_base16.h
  41. 1 1
      src/lib/dns/util/binary_from_base32hex.h
  42. 2 2
      src/lib/dns/util/sha1.cc
  43. 9 12
      src/lib/xfr/fdshare_python.cc
  44. 1 1
      src/lib/xfr/xfrout_client.cc

+ 1 - 1
src/bin/auth/asio_link.cc

@@ -563,7 +563,7 @@ IOService::stop() {
 
 
 asio::io_service&
 asio::io_service&
 IOService::get_io_service() {
 IOService::get_io_service() {
-    return impl_->io_service_;
+    return (impl_->io_service_);
 }
 }
 
 
 void
 void

+ 2 - 2
src/bin/auth/auth_srv.cc

@@ -521,11 +521,11 @@ AuthSrv::updateConfig(isc::data::ElementPtr new_config) {
         ElementPtr answer = isc::config::createAnswer();
         ElementPtr answer = isc::config::createAnswer();
         answer = impl_->setDbFile(new_config);
         answer = impl_->setDbFile(new_config);
 
 
-        return answer;
+        return (answer);
     } catch (const isc::Exception& error) {
     } catch (const isc::Exception& error) {
         if (impl_->verbose_mode_) {
         if (impl_->verbose_mode_) {
             cerr << "[b10-auth] error: " << error.what() << endl;
             cerr << "[b10-auth] error: " << error.what() << endl;
         }
         }
-        return isc::config::createAnswer(1, error.what());
+        return (isc::config::createAnswer(1, error.what()));
     }
     }
 }
 }

+ 2 - 2
src/bin/auth/main.cc

@@ -68,7 +68,7 @@ asio_link::IOService* io_service;
 
 
 ElementPtr
 ElementPtr
 my_config_handler(ElementPtr new_config) {
 my_config_handler(ElementPtr new_config) {
-    return auth_server->updateConfig(new_config);
+    return (auth_server->updateConfig(new_config));
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -83,7 +83,7 @@ my_command_handler(const string& command, const ElementPtr args) {
         io_service->stop();
         io_service->stop();
     }
     }
     
     
-    return answer;
+    return (answer);
 }
 }
 
 
 void
 void

+ 84 - 88
src/lib/cc/data.cc

@@ -35,24 +35,21 @@ namespace isc {
 namespace data {
 namespace data {
 
 
 std::string
 std::string
-Element::str()
-{
+Element::str() {
     std::stringstream ss;
     std::stringstream ss;
     toJSON(ss);
     toJSON(ss);
-    return ss.str();
+    return (ss.str());
 }
 }
 
 
 std::string
 std::string
-Element::toWire()
-{
+Element::toWire() {
     std::stringstream ss;
     std::stringstream ss;
     toJSON(ss);
     toJSON(ss);
-    return ss.str();
+    return (ss.str());
 }
 }
 
 
 void
 void
-Element::toWire(std::ostream& ss)
-{
+Element::toWire(std::ostream& ss) {
     toJSON(ss);
     toJSON(ss);
 }
 }
 
 
@@ -65,63 +62,62 @@ Element::toWire(std::ostream& ss)
 //
 //
 bool
 bool
 Element::getValue(long int& t UNUSED_PARAM) {
 Element::getValue(long int& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::getValue(double& t UNUSED_PARAM) {
 Element::getValue(double& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::getValue(bool& t UNUSED_PARAM) {
 Element::getValue(bool& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::getValue(std::string& t UNUSED_PARAM) {
 Element::getValue(std::string& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::getValue(std::vector<ElementPtr>& t UNUSED_PARAM) {
 Element::getValue(std::vector<ElementPtr>& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::getValue(std::map<std::string, ElementPtr>& t UNUSED_PARAM) {
 Element::getValue(std::map<std::string, ElementPtr>& t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::setValue(const long int v UNUSED_PARAM) {
 Element::setValue(const long int v UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::setValue(const double v UNUSED_PARAM) {
 Element::setValue(const double v UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::setValue(const bool t UNUSED_PARAM) {
 Element::setValue(const bool t UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::setValue(const std::string& v UNUSED_PARAM) {
 Element::setValue(const std::string& v UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
 Element::setValue(const std::vector<ElementPtr>& v UNUSED_PARAM) {
 Element::setValue(const std::vector<ElementPtr>& v UNUSED_PARAM) {
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
-Element::setValue(const std::map<std::string, ElementPtr>& v UNUSED_PARAM)
-{
-    return false;
+Element::setValue(const std::map<std::string, ElementPtr>& v UNUSED_PARAM) {
+    return (false);
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -180,7 +176,7 @@ bool
 Element::find(const std::string& identifier UNUSED_PARAM,
 Element::find(const std::string& identifier UNUSED_PARAM,
               ElementPtr& t UNUSED_PARAM)
               ElementPtr& t UNUSED_PARAM)
 {
 {
-    return false;
+    return (false);
 }
 }
 
 
 namespace {
 namespace {
@@ -194,11 +190,11 @@ throwJSONError(const std::string& error, const std::string& file, int line, int
 }
 }
 
 
 std::ostream& operator <<(std::ostream &out, const isc::data::ElementPtr& e) {
 std::ostream& operator <<(std::ostream &out, const isc::data::ElementPtr& e) {
-    return out << e->str();
+    return (out << e->str());
 }
 }
 
 
 bool operator==(const isc::data::ElementPtr a, const isc::data::ElementPtr b) {
 bool operator==(const isc::data::ElementPtr a, const isc::data::ElementPtr b) {
-    return a->equals(b);
+    return (a->equals(b));
 };
 };
 
 
 //
 //
@@ -206,37 +202,37 @@ bool operator==(const isc::data::ElementPtr a, const isc::data::ElementPtr b) {
 //
 //
 ElementPtr
 ElementPtr
 Element::create() {
 Element::create() {
-    return ElementPtr(new NullElement());
+    return (ElementPtr(new NullElement()));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::create(const long int i) {
 Element::create(const long int i) {
-    return ElementPtr(new IntElement(i));
+    return (ElementPtr(new IntElement(i)));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::create(const double d) {
 Element::create(const double d) {
-    return ElementPtr(new DoubleElement(d));
+    return (ElementPtr(new DoubleElement(d)));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::create(const std::string& s) {
 Element::create(const std::string& s) {
-    return ElementPtr(new StringElement(s));
+    return (ElementPtr(new StringElement(s)));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::create(const bool b) {
 Element::create(const bool b) {
-    return ElementPtr(new BoolElement(b));
+    return (ElementPtr(new BoolElement(b)));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::createList() {
 Element::createList() {
-    return ElementPtr(new ListElement());
+    return (ElementPtr(new ListElement()));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::createMap() {
 Element::createMap() {
-    return ElementPtr(new MapElement());
+    return (ElementPtr(new MapElement()));
 }
 }
 
 
 
 
@@ -248,10 +244,10 @@ bool
 char_in(const char c, const char *chars) {
 char_in(const char c, const char *chars) {
     for (size_t i = 0; i < strlen(chars); ++i) {
     for (size_t i = 0; i < strlen(chars); ++i) {
         if (chars[i] == c) {
         if (chars[i] == c) {
-            return true;
+            return (true);
         }
         }
     }
     }
-    return false;
+    return (false);
 }
 }
 
 
 void
 void
@@ -332,7 +328,7 @@ str_from_stringstream(std::istream &in, const std::string& file, const int line,
         c = in.get();
         c = in.get();
         ++pos;
         ++pos;
     }
     }
-    return ss.str();
+    return (ss.str());
 }
 }
 
 
 std::string
 std::string
@@ -342,7 +338,7 @@ word_from_stringstream(std::istream &in, int& pos) {
         ss << (char) in.get();
         ss << (char) in.get();
     }
     }
     pos += ss.str().size();
     pos += ss.str().size();
-    return ss.str();
+    return (ss.str());
 }
 }
 
 
 static std::string
 static std::string
@@ -353,7 +349,7 @@ number_from_stringstream(std::istream &in, int& pos) {
         ss << (char) in.get();
         ss << (char) in.get();
     }
     }
     pos += ss.str().size();
     pos += ss.str().size();
-    return ss.str();
+    return (ss.str());
 }
 }
 
 
 // Should we change from IntElement and DoubleElement to NumberElement
 // Should we change from IntElement and DoubleElement to NumberElement
@@ -386,9 +382,9 @@ from_stringstream_number(std::istream &in, int &pos) {
     }
     }
     
     
     if (is_double) {
     if (is_double) {
-        return Element::create(d);
+        return (Element::create(d));
     } else {
     } else {
-        return Element::create(i);
+        return (Element::create(i));
     }
     }
 }
 }
 
 
@@ -398,13 +394,13 @@ from_stringstream_bool(std::istream &in, const std::string& file,
 {
 {
     const std::string word = word_from_stringstream(in, pos);
     const std::string word = word_from_stringstream(in, pos);
     if (boost::iequals(word, "True")) {
     if (boost::iequals(word, "True")) {
-        return Element::create(true);
+        return (Element::create(true));
     } else if (boost::iequals(word, "False")) {
     } else if (boost::iequals(word, "False")) {
-        return Element::create(false);
+        return (Element::create(false));
     } else {
     } else {
         throwJSONError(std::string("Bad boolean value: ") + word, file, line, pos);
         throwJSONError(std::string("Bad boolean value: ") + word, file, line, pos);
         // above is a throw shortcurt, return empty is never reached
         // above is a throw shortcurt, return empty is never reached
-        return ElementPtr();
+        return (ElementPtr());
     }
     }
 }
 }
 
 
@@ -414,17 +410,17 @@ from_stringstream_null(std::istream &in, const std::string& file,
 {
 {
     const std::string word = word_from_stringstream(in, pos);
     const std::string word = word_from_stringstream(in, pos);
     if (boost::iequals(word, "null")) {
     if (boost::iequals(word, "null")) {
-        return Element::create();
+        return (Element::create());
     } else {
     } else {
         throwJSONError(std::string("Bad null value: ") + word, file, line, pos);
         throwJSONError(std::string("Bad null value: ") + word, file, line, pos);
-        return ElementPtr();
+        return (ElementPtr());
     }
     }
 }
 }
 
 
 ElementPtr
 ElementPtr
 from_stringstream_string(std::istream& in, const std::string& file, int& line, int& pos)
 from_stringstream_string(std::istream& in, const std::string& file, int& line, int& pos)
 {
 {
-    return Element::create(str_from_stringstream(in, file, line, pos));
+    return (Element::create(str_from_stringstream(in, file, line, pos)));
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -444,7 +440,7 @@ from_stringstream_list(std::istream &in, const std::string& file, int& line, int
         c = in.get();
         c = in.get();
         pos++;
         pos++;
     }
     }
-    return list;
+    return (list);
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -474,53 +470,53 @@ from_stringstream_map(std::istream &in, const std::string& file, int& line,
             pos++;
             pos++;
         }
         }
     }
     }
-    return map;
+    return (map);
 }
 }
 }
 }
 
 
 std::string
 std::string
 Element::typeToName(Element::types type)
 Element::typeToName(Element::types type)
 {
 {
-    switch(type) {
+    switch (type) {
     case Element::integer:
     case Element::integer:
-        return std::string("integer");
+        return (std::string("integer"));
     case Element::real:
     case Element::real:
-        return std::string("real");
+        return (std::string("real"));
     case Element::boolean:
     case Element::boolean:
-        return std::string("boolean");
+        return (std::string("boolean"));
     case Element::string:
     case Element::string:
-        return std::string("string");
+        return (std::string("string"));
     case Element::list:
     case Element::list:
-        return std::string("list");
+        return (std::string("list"));
     case Element::map:
     case Element::map:
-        return std::string("map");
+        return (std::string("map"));
     case Element::null:
     case Element::null:
-        return std::string("null");
+        return (std::string("null"));
     case Element::any:
     case Element::any:
-        return std::string("any");
+        return (std::string("any"));
     default:
     default:
-        return std::string("unknown");
+        return (std::string("unknown"));
     }
     }
 }
 }
 
 
 Element::types
 Element::types
 Element::nameToType(const std::string& type_name) {
 Element::nameToType(const std::string& type_name) {
     if (type_name == "integer") {
     if (type_name == "integer") {
-        return Element::integer;
+        return (Element::integer);
     } else if (type_name == "real") {
     } else if (type_name == "real") {
-        return Element::real;
+        return (Element::real);
     } else if (type_name == "boolean") {
     } else if (type_name == "boolean") {
-        return Element::boolean;
+        return (Element::boolean);
     } else if (type_name == "string") {
     } else if (type_name == "string") {
-        return Element::string;
+        return (Element::string);
     } else if (type_name == "list") {
     } else if (type_name == "list") {
-        return Element::list;
+        return (Element::list);
     } else if (type_name == "map") {
     } else if (type_name == "map") {
-        return Element::map;
+        return (Element::map);
     } else if (type_name == "null") {
     } else if (type_name == "null") {
-        return Element::null;
+        return (Element::null);
     } else if (type_name == "any") {
     } else if (type_name == "any") {
-        return Element::any;
+        return (Element::any);
     } else {
     } else {
         isc_throw(TypeError, type_name + " is not a valid type name");
         isc_throw(TypeError, type_name + " is not a valid type name");
     }
     }
@@ -529,14 +525,14 @@ Element::nameToType(const std::string& type_name) {
 ElementPtr
 ElementPtr
 Element::fromJSON(std::istream& in) throw(JSONError) {
 Element::fromJSON(std::istream& in) throw(JSONError) {
     int line = 1, pos = 1;
     int line = 1, pos = 1;
-    return fromJSON(in, "<istream>", line, pos);
+    return (fromJSON(in, "<istream>", line, pos));
 }
 }
 
 
 ElementPtr
 ElementPtr
 Element::fromJSON(std::istream& in, const std::string& file_name) throw(JSONError)
 Element::fromJSON(std::istream& in, const std::string& file_name) throw(JSONError)
 {
 {
     int line = 1, pos = 1;
     int line = 1, pos = 1;
-    return fromJSON(in, file_name, line, pos);
+    return (fromJSON(in, file_name, line, pos));
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -602,7 +598,7 @@ Element::fromJSON(std::istream &in, const std::string& file, int& line, int& pos
         }
         }
     }
     }
     if (el_read) {
     if (el_read) {
-        return element;
+        return (element);
     } else {
     } else {
         isc_throw(JSONError, "nothing read");
         isc_throw(JSONError, "nothing read");
     }
     }
@@ -612,7 +608,7 @@ ElementPtr
 Element::fromJSON(const std::string &in) {
 Element::fromJSON(const std::string &in) {
     std::stringstream ss;
     std::stringstream ss;
     ss << in;
     ss << in;
-    return fromJSON(ss, "<string>");
+    return (fromJSON(ss, "<string>"));
 }
 }
 
 
 // to JSON format
 // to JSON format
@@ -698,18 +694,18 @@ ElementPtr
 MapElement::find(const std::string& id) {
 MapElement::find(const std::string& id) {
     const size_t sep = id.find('/');
     const size_t sep = id.find('/');
     if (sep == std::string::npos) {
     if (sep == std::string::npos) {
-        return get(id);
+        return (get(id));
     } else {
     } else {
         ElementPtr ce = get(id.substr(0, sep));
         ElementPtr ce = get(id.substr(0, sep));
         if (ce) {
         if (ce) {
             // ignore trailing slash
             // ignore trailing slash
             if  (sep + 1 != id.size()) {
             if  (sep + 1 != id.size()) {
-                return ce->find(id.substr(sep + 1));
+                return (ce->find(id.substr(sep + 1)));
             } else {
             } else {
-                return ce;
+                return (ce);
             }
             }
         } else {
         } else {
-            return ElementPtr();
+            return (ElementPtr());
         }
         }
     }
     }
 }
 }
@@ -719,7 +715,7 @@ Element::fromWire(const std::string& s) {
     std::stringstream ss;
     std::stringstream ss;
     ss << s;
     ss << s;
     int line = 0, pos = 0;
     int line = 0, pos = 0;
-    return fromJSON(ss, "<wire>", line, pos);
+    return (fromJSON(ss, "<wire>", line, pos));
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -735,7 +731,7 @@ Element::fromWire(std::stringstream& in, int length) {
     //}
     //}
     //length -= 4;
     //length -= 4;
     int line = 0, pos = 0;
     int line = 0, pos = 0;
-    return fromJSON(in, "<wire>", line, pos);
+    return (fromJSON(in, "<wire>", line, pos));
 }
 }
 
 
 void
 void
@@ -749,12 +745,12 @@ MapElement::find(const std::string& id, ElementPtr& t) {
         ElementPtr p = find(id);
         ElementPtr p = find(id);
         if (p) {
         if (p) {
             t = p;
             t = p;
-            return true;
+            return (true);
         }
         }
     } catch (const TypeError& e) {
     } catch (const TypeError& e) {
         // ignore
         // ignore
     }
     }
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
@@ -777,7 +773,7 @@ BoolElement::equals(ElementPtr other) {
 
 
 bool
 bool
 NullElement::equals(ElementPtr other) {
 NullElement::equals(ElementPtr other) {
-    return other->getType() == Element::null;
+    return (other->getType() == Element::null);
 }
 }
 
 
 bool
 bool
@@ -791,16 +787,16 @@ ListElement::equals(ElementPtr other) {
     if (other->getType() == Element::list) {
     if (other->getType() == Element::list) {
         const int s = size();
         const int s = size();
         if (s != other->size()) {
         if (s != other->size()) {
-            return false;
+            return (false);
         }
         }
         for (int i = 0; i < s; ++i) {
         for (int i = 0; i < s; ++i) {
             if (!get(i)->equals(other->get(i))) {
             if (!get(i)->equals(other->get(i))) {
-                return false;
+                return (false);
             }
             }
         }
         }
-        return true;
+        return (true);
     } else {
     } else {
-        return false;
+        return (false);
     }
     }
 }
 }
 
 
@@ -812,10 +808,10 @@ MapElement::equals(ElementPtr other) {
              it != m.end() ; ++it) {
              it != m.end() ; ++it) {
             if (other->contains((*it).first)) {
             if (other->contains((*it).first)) {
                 if (!get((*it).first)->equals(other->get((*it).first))) {
                 if (!get((*it).first)->equals(other->get((*it).first))) {
-                    return false;
+                    return (false);
                 }
                 }
             } else {
             } else {
-                return false;
+                return (false);
             }
             }
         }
         }
         // quickly walk through the other map too, to see if there's
         // quickly walk through the other map too, to see if there's
@@ -827,18 +823,18 @@ MapElement::equals(ElementPtr other) {
         for (std::map<std::string, ElementPtr>::const_iterator it = m.begin();
         for (std::map<std::string, ElementPtr>::const_iterator it = m.begin();
              it != m.end() ; ++it) {
              it != m.end() ; ++it) {
             if (!contains((*it).first)) {
             if (!contains((*it).first)) {
-                return false;
+                return (false);
             }
             }
         }
         }
-        return true;
+        return (true);
     } else {
     } else {
-        return false;
+        return (false);
     }
     }
 }
 }
 
 
 bool
 bool
 isNull(ElementPtr p) {
 isNull(ElementPtr p) {
-    return !p;
+    return (!p);
 }
 }
 
 
 void
 void

+ 26 - 26
src/lib/cc/data.h

@@ -90,7 +90,7 @@ public:
     virtual ~Element() {};
     virtual ~Element() {};
 
 
     /// \return the type of this element
     /// \return the type of this element
-    int getType() { return type; };
+    int getType() { return (type); }
 
 
     /// Returns a string representing the Element and all its
     /// Returns a string representing the Element and all its
     /// child elements; note that this is different from stringValue(),
     /// child elements; note that this is different from stringValue(),
@@ -265,13 +265,13 @@ public:
     //@{
     //@{
     static ElementPtr create();
     static ElementPtr create();
     static ElementPtr create(const long int i);
     static ElementPtr create(const long int i);
-    static ElementPtr create(const int i) { return create(static_cast<long int>(i)); };
+    static ElementPtr create(const int i) { return (create(static_cast<long int>(i))); };
     static ElementPtr create(const double d);
     static ElementPtr create(const double d);
     static ElementPtr create(const bool b);
     static ElementPtr create(const bool b);
     static ElementPtr create(const std::string& s);
     static ElementPtr create(const std::string& s);
     // need both std:string and char *, since c++ will match
     // need both std:string and char *, since c++ will match
     // bool before std::string when you pass it a char *
     // bool before std::string when you pass it a char *
-    static ElementPtr create(const char *s) { return create(std::string(s)); };
+    static ElementPtr create(const char *s) { return (create(std::string(s))); }
 
 
     /// \brief Creates an empty ListElement type ElementPtr.
     /// \brief Creates an empty ListElement type ElementPtr.
     static ElementPtr createList();
     static ElementPtr createList();
@@ -364,12 +364,12 @@ class IntElement : public Element {
     long int i;
     long int i;
 
 
 public:
 public:
-    IntElement(long int v) : Element(integer), i(v) { };
-    long int intValue() { return i; }
+    IntElement(long int v) : Element(integer), i(v) { }
+    long int intValue() { return (i); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(long int& t) { t = i; return true; };
+    bool getValue(long int& t) { t = i; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(const long int v) { i = v; return true; };
+    bool setValue(const long int v) { i = v; return (true); }
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
     bool equals(ElementPtr other);
     bool equals(ElementPtr other);
 };
 };
@@ -379,11 +379,11 @@ class DoubleElement : public Element {
 
 
 public:
 public:
     DoubleElement(double v) : Element(real), d(v) {};
     DoubleElement(double v) : Element(real), d(v) {};
-    double doubleValue() { return d; }
+    double doubleValue() { return (d); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(double& t) { t = d; return true; };
+    bool getValue(double& t) { t = d; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(const double v) { d = v; return true; };
+    bool setValue(const double v) { d = v; return (true); }
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
     bool equals(ElementPtr other);
     bool equals(ElementPtr other);
 };
 };
@@ -393,11 +393,11 @@ class BoolElement : public Element {
 
 
 public:
 public:
     BoolElement(const bool v) : Element(boolean), b(v) {};
     BoolElement(const bool v) : Element(boolean), b(v) {};
-    bool boolValue() { return b; }
+    bool boolValue() { return (b); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(bool& t) { t = b; return true; };
+    bool getValue(bool& t) { t = b; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(const bool v) { b = v; return true; };
+    bool setValue(const bool v) { b = v; return (true); }
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
     bool equals(ElementPtr other);
     bool equals(ElementPtr other);
 };
 };
@@ -414,11 +414,11 @@ class StringElement : public Element {
 
 
 public:
 public:
     StringElement(std::string v) : Element(string), s(v) {};
     StringElement(std::string v) : Element(string), s(v) {};
-    std::string stringValue() { return s; };
+    std::string stringValue() { return (s); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(std::string& t) { t = s; return true; };
+    bool getValue(std::string& t) { t = s; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(const std::string& v) { s = v; return true; };
+    bool setValue(const std::string& v) { s = v; return (true); }
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
     bool equals(ElementPtr other);
     bool equals(ElementPtr other);
 };
 };
@@ -428,20 +428,20 @@ class ListElement : public Element {
 
 
 public:
 public:
     ListElement() : Element(list), l(std::vector<ElementPtr>()) {};
     ListElement() : Element(list), l(std::vector<ElementPtr>()) {};
-    const std::vector<ElementPtr>& listValue() { return l; }
+    const std::vector<ElementPtr>& listValue() { return (l); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(std::vector<ElementPtr>& t) { t = l; return true; };
+    bool getValue(std::vector<ElementPtr>& t) { t = l; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(const std::vector<ElementPtr>& v) { l = v; return true; };
+    bool setValue(const std::vector<ElementPtr>& v) { l = v; return (true); }
     using Element::get;
     using Element::get;
-    ElementPtr get(int i) { return l.at(i); };
+    ElementPtr get(int i) { return (l.at(i)); }
     using Element::set;
     using Element::set;
     void set(size_t i, ElementPtr e) { if (i <= l.size()) {l[i] = e;} else { throw std::out_of_range("vector::_M_range_check"); } };
     void set(size_t i, ElementPtr e) { if (i <= l.size()) {l[i] = e;} else { throw std::out_of_range("vector::_M_range_check"); } };
     void add(ElementPtr e) { l.push_back(e); };
     void add(ElementPtr e) { l.push_back(e); };
     using Element::remove;
     using Element::remove;
     void remove(int i) { l.erase(l.begin() + i); };
     void remove(int i) { l.erase(l.begin() + i); };
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
-    size_t size() { return l.size(); }
+    size_t size() { return (l.size()); }
     bool equals(ElementPtr other);
     bool equals(ElementPtr other);
 };
 };
 
 
@@ -451,18 +451,18 @@ class MapElement : public Element {
 public:
 public:
     MapElement() : Element(map), m(std::map<std::string, ElementPtr>()) {};
     MapElement() : Element(map), m(std::map<std::string, ElementPtr>()) {};
     // TODO: should we have direct iterators instead of exposing the std::map here?
     // TODO: should we have direct iterators instead of exposing the std::map here?
-    const std::map<std::string, ElementPtr>& mapValue() { return m; }
+    const std::map<std::string, ElementPtr>& mapValue() { return (m); }
     using Element::getValue;
     using Element::getValue;
-    bool getValue(std::map<std::string, ElementPtr>& t) { t = m; return true; };
+    bool getValue(std::map<std::string, ElementPtr>& t) { t = m; return (true); }
     using Element::setValue;
     using Element::setValue;
-    bool setValue(std::map<std::string, ElementPtr>& v) { m = v; return true; };
+    bool setValue(std::map<std::string, ElementPtr>& v) { m = v; return (true); }
     using Element::get;
     using Element::get;
-    ElementPtr get(const std::string& s) { if (contains(s)) { return m[s]; } else { return ElementPtr();} };
+    ElementPtr get(const std::string& s) { if (contains(s)) { return (m[s]); } else { return (ElementPtr());} }
     using Element::set;
     using Element::set;
     void set(const std::string& key, ElementPtr value);
     void set(const std::string& key, ElementPtr value);
     using Element::remove;
     using Element::remove;
     void remove(const std::string& s) { m.erase(s); }
     void remove(const std::string& s) { m.erase(s); }
-    bool contains(const std::string& s) { return m.find(s) != m.end(); }
+    bool contains(const std::string& s) { return (m.find(s) != m.end()); }
     void toJSON(std::ostream& ss);
     void toJSON(std::ostream& ss);
     
     
     // we should name the two finds better...
     // we should name the two finds better...

+ 7 - 8
src/lib/cc/session.cc

@@ -268,7 +268,7 @@ Session::sendmsg(ElementPtr& env, ElementPtr& msg) {
 bool
 bool
 Session::recvmsg(ElementPtr& msg, bool nonblock, int seq) {
 Session::recvmsg(ElementPtr& msg, bool nonblock, int seq) {
     ElementPtr l_env;
     ElementPtr l_env;
-    return recvmsg(l_env, msg, nonblock, seq);
+    return (recvmsg(l_env, msg, nonblock, seq));
 }
 }
 
 
 bool
 bool
@@ -290,7 +290,7 @@ Session::recvmsg(ElementPtr& env, ElementPtr& msg,
                    env = q_el->get(0);
                    env = q_el->get(0);
                    msg = q_el->get(1);
                    msg = q_el->get(1);
                    impl_->queue_->remove(i);
                    impl_->queue_->remove(i);
-                   return true;
+                   return (true);
             }
             }
         }
         }
     }
     }
@@ -328,13 +328,13 @@ Session::recvmsg(ElementPtr& env, ElementPtr& msg,
        ) {
        ) {
         env = l_env;
         env = l_env;
         msg = l_msg;
         msg = l_msg;
-        return true;
+        return (true);
     } else {
     } else {
         ElementPtr q_el = Element::createList();
         ElementPtr q_el = Element::createList();
         q_el->add(l_env);
         q_el->add(l_env);
         q_el->add(l_msg);
         q_el->add(l_msg);
         impl_->queue_->add(q_el);
         impl_->queue_->add(q_el);
-        return recvmsg(env, msg, nonblock, seq);
+        return (recvmsg(env, msg, nonblock, seq));
     }
     }
     // XXXMLG handle non-block here, and return false for short reads
     // XXXMLG handle non-block here, and return false for short reads
 }
 }
@@ -377,7 +377,7 @@ Session::group_sendmsg(ElementPtr msg, std::string group,
     //env->set("msg", Element::create(msg->toWire()));
     //env->set("msg", Element::create(msg->toWire()));
 
 
     sendmsg(env, msg);
     sendmsg(env, msg);
-    return nseq;
+    return (nseq);
 }
 }
 
 
 bool
 bool
@@ -402,12 +402,11 @@ Session::reply(ElementPtr& envelope, ElementPtr& newmsg) {
 
 
     sendmsg(env, newmsg);
     sendmsg(env, newmsg);
 
 
-    return nseq;
+    return (nseq);
 }
 }
 
 
 bool
 bool
-Session::hasQueuedMsgs()
-{
+Session::hasQueuedMsgs() {
     return (impl_->queue_->size() > 0);
     return (impl_->queue_->size() > 0);
 }
 }
 
 

+ 1 - 1
src/lib/cc/tests/data_unittests.cc

@@ -400,7 +400,7 @@ TEST(Element, to_and_from_wire) {
 
 
 static ElementPtr
 static ElementPtr
 efs(const std::string& str) {
 efs(const std::string& str) {
-    return Element::fromJSON(str);
+    return (Element::fromJSON(str));
 }
 }
 
 
 TEST(Element, equals) {
 TEST(Element, equals) {

+ 21 - 27
src/lib/config/ccsession.cc

@@ -53,17 +53,15 @@ namespace config {
 
 
 /// Creates a standard config/command protocol answer message
 /// Creates a standard config/command protocol answer message
 ElementPtr
 ElementPtr
-createAnswer()
-{
+createAnswer() {
     ElementPtr answer = Element::fromJSON("{\"result\": [] }");
     ElementPtr answer = Element::fromJSON("{\"result\": [] }");
     ElementPtr answer_content = answer->get("result");
     ElementPtr answer_content = answer->get("result");
     answer_content->add(Element::create(0));
     answer_content->add(Element::create(0));
-    return answer;
+    return (answer);
 }
 }
 
 
 ElementPtr
 ElementPtr
-createAnswer(const int rcode, const ElementPtr arg)
-{
+createAnswer(const int rcode, const ElementPtr arg) {
     if (rcode != 0 && (!arg || arg->getType() != Element::string)) {
     if (rcode != 0 && (!arg || arg->getType() != Element::string)) {
         isc_throw(CCSessionError, "Bad or no argument for rcode != 0");
         isc_throw(CCSessionError, "Bad or no argument for rcode != 0");
     }
     }
@@ -71,22 +69,20 @@ createAnswer(const int rcode, const ElementPtr arg)
     ElementPtr answer_content = answer->get("result");
     ElementPtr answer_content = answer->get("result");
     answer_content->add(Element::create(rcode));
     answer_content->add(Element::create(rcode));
     answer_content->add(arg);
     answer_content->add(arg);
-    return answer;
+    return (answer);
 }
 }
 
 
 ElementPtr
 ElementPtr
-createAnswer(const int rcode, const std::string& arg)
-{
+createAnswer(const int rcode, const std::string& arg) {
     ElementPtr answer = Element::fromJSON("{\"result\": [] }");
     ElementPtr answer = Element::fromJSON("{\"result\": [] }");
     ElementPtr answer_content = answer->get("result");
     ElementPtr answer_content = answer->get("result");
     answer_content->add(Element::create(rcode));
     answer_content->add(Element::create(rcode));
     answer_content->add(Element::create(arg));
     answer_content->add(Element::create(arg));
-    return answer;
+    return (answer);
 }
 }
 
 
 ElementPtr
 ElementPtr
-parseAnswer(int &rcode, const ElementPtr msg)
-{
+parseAnswer(int &rcode, const ElementPtr msg) {
     if (msg &&
     if (msg &&
         msg->getType() == Element::map &&
         msg->getType() == Element::map &&
         msg->contains("result")) {
         msg->contains("result")) {
@@ -99,13 +95,13 @@ parseAnswer(int &rcode, const ElementPtr msg)
         rcode = result->get(0)->intValue();
         rcode = result->get(0)->intValue();
         if (result->size() > 1) {
         if (result->size() > 1) {
             if (rcode == 0 || result->get(1)->getType() == Element::string) {
             if (rcode == 0 || result->get(1)->getType() == Element::string) {
-                return result->get(1);
+                return (result->get(1));
             } else {
             } else {
                 isc_throw(CCSessionError, "Error description in result with rcode != 0 is not a string");
                 isc_throw(CCSessionError, "Error description in result with rcode != 0 is not a string");
             }
             }
         } else {
         } else {
             if (rcode == 0) {
             if (rcode == 0) {
-                return ElementPtr();
+                return (ElementPtr());
             } else {
             } else {
                 isc_throw(CCSessionError, "Result with rcode != 0 does not have an error description");
                 isc_throw(CCSessionError, "Result with rcode != 0 does not have an error description");
             }
             }
@@ -116,14 +112,12 @@ parseAnswer(int &rcode, const ElementPtr msg)
 }
 }
 
 
 ElementPtr
 ElementPtr
-createCommand(const std::string& command)
-{
-    return createCommand(command, ElementPtr());
+createCommand(const std::string& command) {
+    return (createCommand(command, ElementPtr()));
 }
 }
 
 
 ElementPtr
 ElementPtr
-createCommand(const std::string& command, ElementPtr arg)
-{
+createCommand(const std::string& command, ElementPtr arg) {
     ElementPtr cmd = Element::createMap();
     ElementPtr cmd = Element::createMap();
     ElementPtr cmd_parts = Element::createList();
     ElementPtr cmd_parts = Element::createList();
     cmd_parts->add(Element::create(command));
     cmd_parts->add(Element::create(command));
@@ -131,7 +125,7 @@ createCommand(const std::string& command, ElementPtr arg)
         cmd_parts->add(arg);
         cmd_parts->add(arg);
     }
     }
     cmd->set("command", cmd_parts);
     cmd->set("command", cmd_parts);
-    return cmd;
+    return (cmd);
 }
 }
 
 
 /// Returns "" and empty ElementPtr() if this does not
 /// Returns "" and empty ElementPtr() if this does not
@@ -151,7 +145,7 @@ parseCommand(ElementPtr& arg, const ElementPtr command)
             } else {
             } else {
                 arg = ElementPtr();
                 arg = ElementPtr();
             }
             }
-            return cmd->get(0)->stringValue();
+            return (cmd->get(0)->stringValue());
         } else {
         } else {
             isc_throw(CCSessionError, "Command part in command message missing, empty, or not a list");
             isc_throw(CCSessionError, "Command part in command message missing, empty, or not a list");
         }
         }
@@ -182,7 +176,7 @@ ModuleCCSession::readModuleSpecification(const std::string& filename) {
         exit(1);
         exit(1);
     }
     }
     file.close();
     file.close();
-    return module_spec;
+    return (module_spec);
 }
 }
 
 
 void
 void
@@ -275,7 +269,7 @@ ModuleCCSession::handleConfigUpdate(ElementPtr new_config)
             setLocalConfig(local_config);
             setLocalConfig(local_config);
         }
         }
     }
     }
-    return answer;
+    return (answer);
 }
 }
 
 
 bool
 bool
@@ -293,7 +287,7 @@ ModuleCCSession::checkCommand()
         /* ignore result messages (in case we're out of sync, to prevent
         /* ignore result messages (in case we're out of sync, to prevent
          * pingpongs */
          * pingpongs */
         if (data->getType() != Element::map || data->contains("result")) {
         if (data->getType() != Element::map || data->contains("result")) {
-            return 0;
+            return (0);
         }
         }
         ElementPtr arg;
         ElementPtr arg;
         ElementPtr answer;
         ElementPtr answer;
@@ -308,7 +302,7 @@ ModuleCCSession::checkCommand()
                     // in our remote config list, update that
                     // in our remote config list, update that
                     updateRemoteConfig(target_module, arg);
                     updateRemoteConfig(target_module, arg);
                     // we're not supposed to answer to this, so return
                     // we're not supposed to answer to this, so return
-                    return 0;
+                    return (0);
                 }
                 }
             } else {
             } else {
                 if (target_module == module_name_) {
                 if (target_module == module_name_) {
@@ -329,7 +323,7 @@ ModuleCCSession::checkCommand()
         }
         }
     }
     }
     
     
-    return 0;
+    return (0);
 }
 }
 
 
 std::string
 std::string
@@ -356,7 +350,7 @@ ModuleCCSession::addRemoteConfig(const std::string& spec_file_name)
 
 
     // all ok, add it
     // all ok, add it
     remote_module_configs_[module_name] = rmod_config;
     remote_module_configs_[module_name] = rmod_config;
-    return module_name;
+    return (module_name);
 }
 }
 
 
 void
 void
@@ -378,7 +372,7 @@ ModuleCCSession::getRemoteConfigValue(const std::string& module_name, const std:
 
 
     it = remote_module_configs_.find(module_name);
     it = remote_module_configs_.find(module_name);
     if (it != remote_module_configs_.end()) {
     if (it != remote_module_configs_.end()) {
-        return remote_module_configs_[module_name].getValue(identifier);
+        return (remote_module_configs_[module_name].getValue(identifier));
     } else {
     } else {
         isc_throw(CCSessionError, "Remote module " + module_name + " not found.");
         isc_throw(CCSessionError, "Remote module " + module_name + " not found.");
     }
     }

+ 7 - 9
src/lib/config/config_data.cc

@@ -104,7 +104,7 @@ find_spec_part(ElementPtr spec, const std::string& identifier)
         }
         }
     }
     }
     //std::cout << "[XX] found spec part: " << std::endl << spec_part << std::endl;
     //std::cout << "[XX] found spec part: " << std::endl << spec_part << std::endl;
-    return spec_part;
+    return (spec_part);
 }
 }
 
 
 //
 //
@@ -142,17 +142,15 @@ spec_name_list(ElementPtr result, ElementPtr spec_part, std::string prefix, bool
 }
 }
 
 
 ElementPtr
 ElementPtr
-ConfigData::getValue(const std::string& identifier)
-{
+ConfigData::getValue(const std::string& identifier) {
     // 'fake' is set, but dropped by this function and
     // 'fake' is set, but dropped by this function and
     // serves no further purpose.
     // serves no further purpose.
     bool fake;
     bool fake;
-    return getValue(fake, identifier);
+    return (getValue(fake, identifier));
 }
 }
 
 
 ElementPtr
 ElementPtr
-ConfigData::getValue(bool& is_default, const std::string& identifier)
-{
+ConfigData::getValue(bool& is_default, const std::string& identifier) {
     ElementPtr value = _config->find(identifier);
     ElementPtr value = _config->find(identifier);
     if (value) {
     if (value) {
         is_default = false;
         is_default = false;
@@ -166,7 +164,7 @@ ConfigData::getValue(bool& is_default, const std::string& identifier)
             value = ElementPtr();
             value = ElementPtr();
         }
         }
     }
     }
-    return value;
+    return (value);
 }
 }
 
 
 /// Returns an ElementPtr pointing to a ListElement containing
 /// Returns an ElementPtr pointing to a ListElement containing
@@ -181,7 +179,7 @@ ConfigData::getItemList(const std::string& identifier, bool recurse)
         spec_part = find_spec_part(spec_part, identifier);
         spec_part = find_spec_part(spec_part, identifier);
     }
     }
     spec_name_list(result, spec_part, identifier, recurse);
     spec_name_list(result, spec_part, identifier, recurse);
-    return result;
+    return (result);
 }
 }
 
 
 /// Returns an ElementPtr containing a MapElement with identifier->value
 /// Returns an ElementPtr containing a MapElement with identifier->value
@@ -194,7 +192,7 @@ ConfigData::getFullConfig()
     BOOST_FOREACH(ElementPtr item, items->listValue()) {
     BOOST_FOREACH(ElementPtr item, items->listValue()) {
         result->set(item->stringValue(), getValue(item->stringValue()));
         result->set(item->stringValue(), getValue(item->stringValue()));
     }
     }
-    return result;
+    return (result);
 }
 }
 
 
 }
 }

+ 2 - 2
src/lib/config/config_data.h

@@ -70,7 +70,7 @@ public:
     ElementPtr getValue(bool &is_default, const std::string& identifier);
     ElementPtr getValue(bool &is_default, const std::string& identifier);
 
 
     /// Returns the ModuleSpec associated with this ConfigData object
     /// Returns the ModuleSpec associated with this ConfigData object
-    const ModuleSpec getModuleSpec() { return _module_spec; };
+    const ModuleSpec getModuleSpec() { return (_module_spec); }
     
     
     /// Set the ModuleSpec associated with this ConfigData object
     /// Set the ModuleSpec associated with this ConfigData object
     void setModuleSpec(ModuleSpec module_spec) { _module_spec = module_spec; };
     void setModuleSpec(ModuleSpec module_spec) { _module_spec = module_spec; };
@@ -84,7 +84,7 @@ public:
     /// Returns the local (i.e. non-default) configuration.
     /// Returns the local (i.e. non-default) configuration.
     /// \returns An ElementPtr pointing to a MapElement containing all
     /// \returns An ElementPtr pointing to a MapElement containing all
     ///          non-default configuration options.
     ///          non-default configuration options.
-    ElementPtr getLocalConfig() { return _config; }
+    ElementPtr getLocalConfig() { return (_config); }
     
     
     /// Returns a list of all possible configuration options as specified
     /// Returns a list of all possible configuration options as specified
     ///         by the ModuleSpec.
     ///         by the ModuleSpec.

+ 38 - 41
src/lib/config/module_spec.cc

@@ -141,53 +141,49 @@ ModuleSpec::ModuleSpec(ElementPtr module_spec_element,
 }
 }
 
 
 const ElementPtr
 const ElementPtr
-ModuleSpec::getCommandsSpec() const
-{
+ModuleSpec::getCommandsSpec() const {
     if (module_specification->contains("commands")) {
     if (module_specification->contains("commands")) {
-        return module_specification->get("commands");
+        return (module_specification->get("commands"));
     } else {
     } else {
-        return ElementPtr();
+        return (ElementPtr());
     }
     }
 }
 }
 
 
 const ElementPtr
 const ElementPtr
-ModuleSpec::getConfigSpec() const
-{
+ModuleSpec::getConfigSpec() const {
     if (module_specification->contains("config_data")) {
     if (module_specification->contains("config_data")) {
-        return module_specification->get("config_data");
+        return (module_specification->get("config_data"));
     } else {
     } else {
-        return ElementPtr();
+        return (ElementPtr());
     }
     }
 }
 }
 
 
 const std::string
 const std::string
-ModuleSpec::getModuleName() const
-{
-    return module_specification->get("module_name")->stringValue();
+ModuleSpec::getModuleName() const {
+    return (module_specification->get("module_name")->stringValue());
 }
 }
 
 
 const std::string
 const std::string
-ModuleSpec::getModuleDescription() const
-{
+ModuleSpec::getModuleDescription() const {
     if (module_specification->contains("module_description")) {
     if (module_specification->contains("module_description")) {
-        return module_specification->get("module_description")->stringValue();
+        return (module_specification->get("module_description")->stringValue());
     } else {
     } else {
-        return std::string("");
+        return (std::string(""));
     }
     }
 }
 }
 
 
 bool
 bool
-ModuleSpec::validate_config(const ElementPtr data, const bool full)
-{
+ModuleSpec::validate_config(const ElementPtr data, const bool full) {
     ElementPtr spec = module_specification->find("config_data");
     ElementPtr spec = module_specification->find("config_data");
-    return validate_spec_list(spec, data, full, ElementPtr());
+    return (validate_spec_list(spec, data, full, ElementPtr()));
 }
 }
 
 
 bool
 bool
-ModuleSpec::validate_config(const ElementPtr data, const bool full, ElementPtr errors)
+ModuleSpec::validate_config(const ElementPtr data, const bool full,
+                            ElementPtr errors)
 {
 {
     ElementPtr spec = module_specification->find("config_data");
     ElementPtr spec = module_specification->find("config_data");
-    return validate_spec_list(spec, data, full, errors);
+    return (validate_spec_list(spec, data, full, errors));
 }
 }
 
 
 ModuleSpec
 ModuleSpec
@@ -205,7 +201,7 @@ moduleSpecFromFile(const std::string& file_name, const bool check)
 
 
     ElementPtr module_spec_element = Element::fromJSON(file, file_name);
     ElementPtr module_spec_element = Element::fromJSON(file, file_name);
     if (module_spec_element->contains("module_spec")) {
     if (module_spec_element->contains("module_spec")) {
-        return ModuleSpec(module_spec_element->get("module_spec"), check);
+        return (ModuleSpec(module_spec_element->get("module_spec"), check));
     } else {
     } else {
         throw ModuleSpecError("No module_spec in specification");
         throw ModuleSpecError("No module_spec in specification");
     }
     }
@@ -213,10 +209,11 @@ moduleSpecFromFile(const std::string& file_name, const bool check)
 
 
 ModuleSpec
 ModuleSpec
 moduleSpecFromFile(std::ifstream& in, const bool check)
 moduleSpecFromFile(std::ifstream& in, const bool check)
-                   throw(JSONError, ModuleSpecError) {
+                   throw(JSONError, ModuleSpecError)
+{
     ElementPtr module_spec_element = Element::fromJSON(in);
     ElementPtr module_spec_element = Element::fromJSON(in);
     if (module_spec_element->contains("module_spec")) {
     if (module_spec_element->contains("module_spec")) {
-        return ModuleSpec(module_spec_element->get("module_spec"), check);
+        return (ModuleSpec(module_spec_element->get("module_spec"), check));
     } else {
     } else {
         throw ModuleSpecError("No module_spec in specification");
         throw ModuleSpecError("No module_spec in specification");
     }
     }
@@ -236,29 +233,29 @@ check_type(ElementPtr spec, ElementPtr element)
     std::string cur_item_type;
     std::string cur_item_type;
     cur_item_type = spec->get("item_type")->stringValue();
     cur_item_type = spec->get("item_type")->stringValue();
     if (cur_item_type == "any") {
     if (cur_item_type == "any") {
-        return true;
+        return (true);
     }
     }
     switch (element->getType()) {
     switch (element->getType()) {
         case Element::integer:
         case Element::integer:
-            return cur_item_type == "integer";
+            return (cur_item_type == "integer");
             break;
             break;
         case Element::real:
         case Element::real:
-            return cur_item_type == "real";
+            return (cur_item_type == "real");
             break;
             break;
         case Element::boolean:
         case Element::boolean:
-            return cur_item_type == "boolean";
+            return (cur_item_type == "boolean");
             break;
             break;
         case Element::string:
         case Element::string:
-            return cur_item_type == "string";
+            return (cur_item_type == "string");
             break;
             break;
         case Element::list:
         case Element::list:
-            return cur_item_type == "list";
+            return (cur_item_type == "list");
             break;
             break;
         case Element::map:
         case Element::map:
-            return cur_item_type == "map";
+            return (cur_item_type == "map");
             break;
             break;
     }
     }
-    return false;
+    return (false);
 }
 }
 
 
 bool
 bool
@@ -270,7 +267,7 @@ ModuleSpec::validate_item(const ElementPtr spec, const ElementPtr data, const bo
         if (errors) {
         if (errors) {
             errors->add(Element::create("Type mismatch"));
             errors->add(Element::create("Type mismatch"));
         }
         }
-        return false;
+        return (false);
     }
     }
     if (data->getType() == Element::list) {
     if (data->getType() == Element::list) {
         ElementPtr list_spec = spec->get("list_item_spec");
         ElementPtr list_spec = spec->get("list_item_spec");
@@ -279,21 +276,21 @@ ModuleSpec::validate_item(const ElementPtr spec, const ElementPtr data, const bo
                 if (errors) {
                 if (errors) {
                     errors->add(Element::create("Type mismatch"));
                     errors->add(Element::create("Type mismatch"));
                 }
                 }
-                return false;
+                return (false);
             }
             }
             if (list_spec->get("item_type")->stringValue() == "map") {
             if (list_spec->get("item_type")->stringValue() == "map") {
                 if (!validate_item(list_spec, list_el, full, errors)) {
                 if (!validate_item(list_spec, list_el, full, errors)) {
-                    return false;
+                    return (false);
                 }
                 }
             }
             }
         }
         }
     }
     }
     if (data->getType() == Element::map) {
     if (data->getType() == Element::map) {
         if (!validate_spec_list(spec->get("map_item_spec"), data, full, errors)) {
         if (!validate_spec_list(spec->get("map_item_spec"), data, full, errors)) {
-            return false;
+            return (false);
         }
         }
     }
     }
-    return true;
+    return (true);
 }
 }
 
 
 // spec is a map with item_name etc, data is a map
 // spec is a map with item_name etc, data is a map
@@ -306,17 +303,17 @@ ModuleSpec::validate_spec(const ElementPtr spec, const ElementPtr data, const bo
     
     
     if (data_el) {
     if (data_el) {
         if (!validate_item(spec, data_el, full, errors)) {
         if (!validate_item(spec, data_el, full, errors)) {
-            return false;
+            return (false);
         }
         }
     } else {
     } else {
         if (!optional && full) {
         if (!optional && full) {
             if (errors) {
             if (errors) {
                 errors->add(Element::create("Non-optional value missing"));
                 errors->add(Element::create("Non-optional value missing"));
             }
             }
-            return false;
+            return (false);
         }
         }
     }
     }
-    return true;
+    return (true);
 }
 }
 
 
 // spec is a list of maps, data is a map
 // spec is a list of maps, data is a map
@@ -326,10 +323,10 @@ ModuleSpec::validate_spec_list(const ElementPtr spec, const ElementPtr data, con
     std::string cur_item_name;
     std::string cur_item_name;
     BOOST_FOREACH(ElementPtr cur_spec_el, spec->listValue()) {
     BOOST_FOREACH(ElementPtr cur_spec_el, spec->listValue()) {
         if (!validate_spec(cur_spec_el, data, full, errors)) {
         if (!validate_spec(cur_spec_el, data, full, errors)) {
-            return false;
+            return (false);
         }
         }
     }
     }
-    return true;
+    return (true);
 }
 }
 
 
 }
 }

+ 2 - 2
src/lib/config/module_spec.h

@@ -34,7 +34,7 @@ namespace isc { namespace config {
     public:
     public:
         ModuleSpecError(std::string m = "Module specification is invalid") : msg(m) {}
         ModuleSpecError(std::string m = "Module specification is invalid") : msg(m) {}
         ~ModuleSpecError() throw() {}
         ~ModuleSpecError() throw() {}
-        const char* what() const throw() { return msg.c_str(); }
+        const char* what() const throw() { return (msg.c_str()); }
     private:
     private:
         std::string msg;
         std::string msg;
     };
     };
@@ -72,7 +72,7 @@ namespace isc { namespace config {
 
 
         /// Returns the full module specification as an ElementPtr
         /// Returns the full module specification as an ElementPtr
         /// \return ElementPtr Shared pointer to the specification
         /// \return ElementPtr Shared pointer to the specification
-        const ElementPtr getFullSpec() const { return module_specification; };
+        const ElementPtr getFullSpec() const { return (module_specification); }
 
 
         /// Returns the module name as specified by the specification
         /// Returns the module name as specified by the specification
         const std::string getModuleName() const;
         const std::string getModuleName() const;

+ 9 - 9
src/lib/config/tests/ccsession_unittests.cc

@@ -34,12 +34,12 @@ using namespace std;
 namespace {
 namespace {
 std::string
 std::string
 ccspecfile(const std::string name) {
 ccspecfile(const std::string name) {
-    return std::string(TEST_DATA_PATH) + "/" + name;
+    return (std::string(TEST_DATA_PATH) + "/" + name);
 }
 }
 
 
 ElementPtr
 ElementPtr
 el(const std::string& str) {
 el(const std::string& str) {
-    return Element::fromJSON(str);
+    return (Element::fromJSON(str));
 }
 }
 
 
 class CCSessionTest : public ::testing::Test {
 class CCSessionTest : public ::testing::Test {
@@ -183,28 +183,28 @@ TEST_F(CCSessionTest, session2)
 ElementPtr my_config_handler(ElementPtr new_config) {
 ElementPtr my_config_handler(ElementPtr new_config) {
     if (new_config && new_config->contains("item1") &&
     if (new_config && new_config->contains("item1") &&
         new_config->get("item1")->intValue() == 5) {
         new_config->get("item1")->intValue() == 5) {
-        return createAnswer(6, "I do not like the number 5");
+        return (createAnswer(6, "I do not like the number 5"));
     }
     }
-    return createAnswer();
+    return (createAnswer());
 }
 }
 
 
 ElementPtr my_command_handler(const std::string& command,
 ElementPtr my_command_handler(const std::string& command,
                               ElementPtr arg UNUSED_PARAM)
                               ElementPtr arg UNUSED_PARAM)
 {
 {
     if (command == "good_command") {
     if (command == "good_command") {
-        return createAnswer();
+        return (createAnswer());
     } else if (command == "command_with_arg") {
     } else if (command == "command_with_arg") {
         if (arg) {
         if (arg) {
             if (arg->getType() == Element::integer) {
             if (arg->getType() == Element::integer) {
-                return createAnswer(0, el("2"));
+                return (createAnswer(0, el("2")));
             } else {
             } else {
-                return createAnswer(1, "arg bad type");
+                return (createAnswer(1, "arg bad type"));
             }
             }
         } else {
         } else {
-            return createAnswer(1, "arg missing");
+            return (createAnswer(1, "arg missing"));
         }
         }
     } else {
     } else {
-        return createAnswer(1, "bad command");
+        return (createAnswer(1, "bad command"));
     }
     }
 }
 }
 
 

+ 2 - 3
src/lib/config/tests/config_data_unittests.cc

@@ -26,10 +26,9 @@ using namespace isc::data;
 using namespace isc::config;
 using namespace isc::config;
 
 
 ConfigData
 ConfigData
-setupSpec2()
-{
+setupSpec2() {
     ModuleSpec spec2 = moduleSpecFromFile(std::string(TEST_DATA_PATH) + "/spec22.spec");
     ModuleSpec spec2 = moduleSpecFromFile(std::string(TEST_DATA_PATH) + "/spec22.spec");
-    return ConfigData(spec2);
+    return (ConfigData(spec2));
 }
 }
 
 
 TEST(ConfigData, Creation) {
 TEST(ConfigData, Creation) {

+ 7 - 7
src/lib/config/tests/fake_session.cc

@@ -145,7 +145,7 @@ FakeSession::recvmsg(ElementPtr& env, ElementPtr& msg,
         // do we need initial message to have env[group] and [to] too?
         // do we need initial message to have env[group] and [to] too?
         msg = messages_->get(0);
         msg = messages_->get(0);
         messages_->remove(0);
         messages_->remove(0);
-        return true;
+        return (true);
     } else if (msg_queue_) {
     } else if (msg_queue_) {
         BOOST_FOREACH(ElementPtr c_m, msg_queue_->listValue()) {
         BOOST_FOREACH(ElementPtr c_m, msg_queue_->listValue()) {
             ElementPtr to_remove = ElementPtr();
             ElementPtr to_remove = ElementPtr();
@@ -158,13 +158,13 @@ FakeSession::recvmsg(ElementPtr& env, ElementPtr& msg,
             }
             }
             if (to_remove) {
             if (to_remove) {
                 listRemove(msg_queue_, to_remove);
                 listRemove(msg_queue_, to_remove);
-                return true;
+                return (true);
             }
             }
         }
         }
     }
     }
     msg = ElementPtr();
     msg = ElementPtr();
     env = ElementPtr();
     env = ElementPtr();
-    return false;
+    return (false);
 }
 }
 
 
 void
 void
@@ -198,7 +198,7 @@ FakeSession::group_sendmsg(ElementPtr msg, std::string group,
     //cout << "[XX] client sends message: " << msg << endl;
     //cout << "[XX] client sends message: " << msg << endl;
     //cout << "[XX] to: " << group << " . " << instance << "." << to << endl;
     //cout << "[XX] to: " << group << " . " << instance << "." << to << endl;
     addMessage(msg, group, to);
     addMessage(msg, group, to);
-    return 1;
+    return (1);
 }
 }
 
 
 bool
 bool
@@ -213,12 +213,12 @@ FakeSession::reply(ElementPtr& envelope, ElementPtr& newmsg) {
     //cout << "[XX] client sends reply: " << newmsg << endl;
     //cout << "[XX] client sends reply: " << newmsg << endl;
     //cout << "[XX] env: " << envelope << endl;
     //cout << "[XX] env: " << envelope << endl;
     addMessage(newmsg, envelope->get("group")->stringValue(), envelope->get("to")->stringValue());
     addMessage(newmsg, envelope->get("group")->stringValue(), envelope->get("to")->stringValue());
-    return 1;
+    return (1);
 }
 }
 
 
 bool
 bool
 FakeSession::hasQueuedMsgs() {
 FakeSession::hasQueuedMsgs() {
-    return false;
+    return (false);
 }
 }
 
 
 ElementPtr
 ElementPtr
@@ -229,7 +229,7 @@ FakeSession::getFirstMessage(std::string& group, std::string& to) {
         msg_queue_->remove(0);
         msg_queue_->remove(0);
         group = el->get(0)->stringValue();
         group = el->get(0)->stringValue();
         to = el->get(1)->stringValue();
         to = el->get(1)->stringValue();
-        return el->get(2);
+        return (el->get(2));
     } else {
     } else {
         group = "";
         group = "";
         to = "";
         to = "";

+ 4 - 5
src/lib/config/tests/module_spec_unittests.cc

@@ -26,7 +26,7 @@ using namespace isc::data;
 using namespace isc::config;
 using namespace isc::config;
 
 
 std::string specfile(const std::string name) {
 std::string specfile(const std::string name) {
-    return std::string(TEST_DATA_PATH) + "/" + name;
+    return (std::string(TEST_DATA_PATH) + "/" + name);
 }
 }
 
 
 void
 void
@@ -134,15 +134,14 @@ TEST(ModuleSpec, SpecfileCommands)
 }
 }
 
 
 bool
 bool
-data_test(ModuleSpec dd, const std::string& data_file_name)
-{
+data_test(ModuleSpec dd, const std::string& data_file_name) {
     std::ifstream data_file;
     std::ifstream data_file;
 
 
     data_file.open(specfile(data_file_name).c_str());
     data_file.open(specfile(data_file_name).c_str());
     ElementPtr data = Element::fromJSON(data_file, data_file_name);
     ElementPtr data = Element::fromJSON(data_file, data_file_name);
     data_file.close();
     data_file.close();
 
 
-    return dd.validate_config(data);
+    return (dd.validate_config(data));
 }
 }
 
 
 bool
 bool
@@ -154,7 +153,7 @@ data_test_with_errors(ModuleSpec dd, const std::string& data_file_name, ElementP
     ElementPtr data = Element::fromJSON(data_file, data_file_name);
     ElementPtr data = Element::fromJSON(data_file, data_file_name);
     data_file.close();
     data_file.close();
 
 
-    return dd.validate_config(data, true, errors);
+    return (dd.validate_config(data, true, errors));
 }
 }
 
 
 TEST(ModuleSpec, DataValidation) {
 TEST(ModuleSpec, DataValidation) {

+ 1 - 1
src/lib/datasrc/data_source.cc

@@ -1246,7 +1246,7 @@ Nsec3Param::getHash(const Name& name) const {
 //
 //
 DataSrc::Result
 DataSrc::Result
 DataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM) {
 DataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM) {
-    return NOT_IMPLEMENTED;
+    return (NOT_IMPLEMENTED);
 }
 }
 
 
 DataSrc::Result
 DataSrc::Result

+ 4 - 4
src/lib/datasrc/data_source.h

@@ -182,13 +182,13 @@ public:
 
 
     virtual void findClosestEnclosure(DataSrcMatch& match) const = 0;
     virtual void findClosestEnclosure(DataSrcMatch& match) const = 0;
 
 
-    const isc::dns::RRClass& getClass() const { return rrclass; }
+    const isc::dns::RRClass& getClass() const { return (rrclass); }
     void setClass(isc::dns::RRClass& c) { rrclass = c; }
     void setClass(isc::dns::RRClass& c) { rrclass = c; }
     void setClass(const isc::dns::RRClass& c) { rrclass = c; }
     void setClass(const isc::dns::RRClass& c) { rrclass = c; }
 
 
-    Result init() { return NOT_IMPLEMENTED; }
+    Result init() { return (NOT_IMPLEMENTED); }
     Result init(const isc::data::ElementPtr config);
     Result init(const isc::data::ElementPtr config);
-    Result close() { return NOT_IMPLEMENTED; }
+    Result close() { return (NOT_IMPLEMENTED); }
 
 
     virtual Result findRRset(const isc::dns::Name& qname,
     virtual Result findRRset(const isc::dns::Name& qname,
                              const isc::dns::RRClass& qclass,
                              const isc::dns::RRClass& qclass,
@@ -247,7 +247,7 @@ public:
 
 
     void addDataSrc(ConstDataSrcPtr data_src);
     void addDataSrc(ConstDataSrcPtr data_src);
     void removeDataSrc(ConstDataSrcPtr data_src);
     void removeDataSrc(ConstDataSrcPtr data_src);
-    size_t dataSrcCount() { return data_sources.size(); };
+    size_t dataSrcCount() { return (data_sources.size()); }
     
     
     void findClosestEnclosure(DataSrcMatch& match) const;
     void findClosestEnclosure(DataSrcMatch& match) const;
 
 

+ 1 - 1
src/lib/datasrc/sqlite3_datasrc.h

@@ -94,7 +94,7 @@ public:
                              std::string& hash,
                              std::string& hash,
                              isc::dns::RRsetList& target) const;
                              isc::dns::RRsetList& target) const;
 
 
-    Result init() { return init(isc::data::ElementPtr()); };
+    Result init() { return (init(isc::data::ElementPtr())); }
     Result init(const isc::data::ElementPtr config);
     Result init(const isc::data::ElementPtr config);
     Result close();
     Result close();
 
 

+ 1 - 1
src/lib/datasrc/static_datasrc.cc

@@ -261,7 +261,7 @@ StaticDataSrc::init() {
 // is intentionally ignored.
 // is intentionally ignored.
 DataSrc::Result
 DataSrc::Result
 StaticDataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM) {
 StaticDataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM) {
-    return init();
+    return (init());
 }
 }
 
 
 DataSrc::Result
 DataSrc::Result

+ 1 - 1
src/lib/datasrc/tests/test_datasrc.cc

@@ -309,7 +309,7 @@ vector<Zone> zones;
 DataSrc::Result
 DataSrc::Result
 TestDataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM)
 TestDataSrc::init(const isc::data::ElementPtr config UNUSED_PARAM)
 {
 {
-    return init();
+    return (init());
 }
 }
 
 
 void
 void

+ 1 - 1
src/lib/dns/name.h

@@ -406,7 +406,7 @@ public:
     /// This method simply negates the result of \c equal() method, and in that
     /// This method simply negates the result of \c equal() method, and in that
     /// sense it's redundant.  The separate method is provided just for
     /// sense it's redundant.  The separate method is provided just for
     /// convenience.
     /// convenience.
-    bool nequals(const Name& other) const { return !(equals(other)); }
+    bool nequals(const Name& other) const { return (!(equals(other))); }
 
 
     /// Same as nequals()
     /// Same as nequals()
     bool operator!=(const Name& other) const { return (nequals(other)); }
     bool operator!=(const Name& other) const { return (nequals(other)); }

+ 10 - 10
src/lib/dns/python/message_python.cc

@@ -326,9 +326,9 @@ Opcode_toText(s_Opcode* self) {
 static PyObject*
 static PyObject*
 Opcode_str(PyObject* self) {
 Opcode_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*
@@ -624,9 +624,9 @@ Rcode_toText(s_Rcode* self) {
 static PyObject*
 static PyObject*
 Rcode_str(PyObject* self) {
 Rcode_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*
@@ -886,22 +886,22 @@ Section_createStatic(const Section& section) {
 
 
 static PyObject*
 static PyObject*
 Section_QUESTION(s_Section* self UNUSED_PARAM) {
 Section_QUESTION(s_Section* self UNUSED_PARAM) {
-    return Section_createStatic(Section::QUESTION());
+    return (Section_createStatic(Section::QUESTION()));
 }
 }
 
 
 static PyObject*
 static PyObject*
 Section_ANSWER(s_Section* self UNUSED_PARAM) {
 Section_ANSWER(s_Section* self UNUSED_PARAM) {
-    return Section_createStatic(Section::ANSWER());
+    return (Section_createStatic(Section::ANSWER()));
 }
 }
 
 
 static PyObject*
 static PyObject*
 Section_AUTHORITY(s_Section* self UNUSED_PARAM) {
 Section_AUTHORITY(s_Section* self UNUSED_PARAM) {
-    return Section_createStatic(Section::AUTHORITY());
+    return (Section_createStatic(Section::AUTHORITY()));
 }
 }
 
 
 static PyObject*
 static PyObject*
 Section_ADDITIONAL(s_Section* self UNUSED_PARAM) {
 Section_ADDITIONAL(s_Section* self UNUSED_PARAM) {
-    return Section_createStatic(Section::ADDITIONAL());
+    return (Section_createStatic(Section::ADDITIONAL()));
 }
 }
 
 
 static PyObject* 
 static PyObject* 
@@ -1526,9 +1526,9 @@ Message_toText(s_Message* self) {
 static PyObject*
 static PyObject*
 Message_str(PyObject* self) {
 Message_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/messagerenderer_python.cc

@@ -133,9 +133,9 @@ MessageRenderer_destroy(s_MessageRenderer* self) {
 
 
 static PyObject*
 static PyObject*
 MessageRenderer_getData(s_MessageRenderer* self) {
 MessageRenderer_getData(s_MessageRenderer* self) {
-    return Py_BuildValue("y#",
+    return (Py_BuildValue("y#",
                          self->messagerenderer->getData(),
                          self->messagerenderer->getData(),
-                         self->messagerenderer->getLength());
+                          self->messagerenderer->getLength()));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/name_python.cc

@@ -400,9 +400,9 @@ Name_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
     // str() is not defined in the c++ version, only to_text
     // str() is not defined in the c++ version, only to_text
     // and we already have a wrapper for that one.
     // and we already have a wrapper for that one.
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/question_python.cc

@@ -231,9 +231,9 @@ Question_toText(s_Question* self) {
 static PyObject*
 static PyObject*
 Question_str(PyObject* self) {
 Question_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/rdata_python.cc

@@ -174,9 +174,9 @@ Rdata_toText(s_Rdata* self) {
 static PyObject*
 static PyObject*
 Rdata_str(PyObject* self) {
 Rdata_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/rrclass_python.cc

@@ -215,9 +215,9 @@ RRClass_toText(s_RRClass* self) {
 static PyObject*
 static PyObject*
 RRClass_str(PyObject* self) {
 RRClass_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/rrset_python.cc

@@ -293,9 +293,9 @@ RRset_toText(s_RRset* self) {
 static PyObject*
 static PyObject*
 RRset_str(PyObject* self) {
 RRset_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/rrttl_python.cc

@@ -213,9 +213,9 @@ RRTTL_toText(s_RRTTL* self) {
 static PyObject*
 static PyObject*
 RRTTL_str(PyObject* self) {
 RRTTL_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self,
+    return (PyObject_CallMethod(self,
                                const_cast<char*>("to_text"),
                                const_cast<char*>("to_text"),
-                               const_cast<char*>(""));
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 2 - 2
src/lib/dns/python/rrtype_python.cc

@@ -253,8 +253,8 @@ RRType_toText(s_RRType* self) {
 static PyObject*
 static PyObject*
 RRType_str(PyObject* self) {
 RRType_str(PyObject* self) {
     // Simply call the to_text method we already defined
     // Simply call the to_text method we already defined
-    return PyObject_CallMethod(self, const_cast<char*>("to_text"),
-                                     const_cast<char*>(""));
+    return (PyObject_CallMethod(self, const_cast<char*>("to_text"),
+                                const_cast<char*>("")));
 }
 }
 
 
 static PyObject*
 static PyObject*

+ 1 - 1
src/lib/dns/rdata/generic/ds_43.cc

@@ -173,7 +173,7 @@ DS::compare(const Rdata& other) const
 
 
 uint16_t
 uint16_t
 DS::getTag() const {
 DS::getTag() const {
-    return impl_->tag_;
+    return (impl_->tag_);
 }
 }
 
 
 // END_RDATA_NAMESPACE
 // END_RDATA_NAMESPACE

+ 4 - 4
src/lib/dns/rdata/generic/nsec3_50.cc

@@ -323,22 +323,22 @@ NSEC3::compare(const Rdata& other) const
 
 
 uint8_t
 uint8_t
 NSEC3::getHashalg() const {
 NSEC3::getHashalg() const {
-    return impl_->hashalg_;
+    return (impl_->hashalg_);
 }
 }
 
 
 uint8_t
 uint8_t
 NSEC3::getFlags() const {
 NSEC3::getFlags() const {
-    return impl_->flags_;
+    return (impl_->flags_);
 }
 }
 
 
 uint16_t
 uint16_t
 NSEC3::getIterations() const {
 NSEC3::getIterations() const {
-    return impl_->iterations_;
+    return (impl_->iterations_);
 }
 }
 
 
 vector<uint8_t>&
 vector<uint8_t>&
 NSEC3::getSalt() const {
 NSEC3::getSalt() const {
-    return impl_->salt_;
+    return (impl_->salt_);
 }
 }
 
 
 // END_RDATA_NAMESPACE
 // END_RDATA_NAMESPACE

+ 2 - 2
src/lib/dns/rrsetlist.cc

@@ -53,10 +53,10 @@ RRsetList::findRRset(const RRType& rrtype, const RRClass& rrclass) {
     BOOST_FOREACH(RRsetPtr rrsetptr, rrsets_) {
     BOOST_FOREACH(RRsetPtr rrsetptr, rrsets_) {
         if ((rrsetptr->getClass() == rrclass) &&
         if ((rrsetptr->getClass() == rrclass) &&
             (rrsetptr->getType() == rrtype)) {
             (rrsetptr->getType() == rrtype)) {
-            return rrsetptr;
+            return (rrsetptr);
         }
         }
     }
     }
-    return RRsetPtr();
+    return (RRsetPtr());
 }
 }
 
 
 }
 }

+ 2 - 2
src/lib/dns/rrtype-placeholder.h

@@ -221,7 +221,7 @@ public:
     bool equals(const RRType& other) const
     bool equals(const RRType& other) const
     { return (typecode_ == other.typecode_); }
     { return (typecode_ == other.typecode_); }
     /// \brief Same as \c equals().
     /// \brief Same as \c equals().
-    bool operator==(const RRType& other) const { return equals(other); }
+    bool operator==(const RRType& other) const { return (equals(other)); }
 
 
     /// \brief Return true iff two RRTypes are equal.
     /// \brief Return true iff two RRTypes are equal.
     ///
     ///
@@ -232,7 +232,7 @@ public:
     bool nequals(const RRType& other) const 
     bool nequals(const RRType& other) const 
     { return (typecode_ != other.typecode_); }
     { return (typecode_ != other.typecode_); }
     /// \brief Same as \c nequals().
     /// \brief Same as \c nequals().
-    bool operator!=(const RRType& other) const { return nequals(other); }
+    bool operator!=(const RRType& other) const { return (nequals(other)); }
  
  
     /// \brief Less-than comparison for RRType against \c other
     /// \brief Less-than comparison for RRType against \c other
     ///
     ///

+ 3 - 3
src/lib/dns/tests/rrparamregistry_unittest.cc

@@ -107,11 +107,11 @@ TEST_F(RRParamRegistryTest, addError)
 class TestRdataFactory : public AbstractRdataFactory {
 class TestRdataFactory : public AbstractRdataFactory {
 public:
 public:
     virtual RdataPtr create(const string& rdata_str) const
     virtual RdataPtr create(const string& rdata_str) const
-    { return RdataPtr(new in::A(rdata_str)); }
+    { return (RdataPtr(new in::A(rdata_str))); }
     virtual RdataPtr create(InputBuffer& buffer, size_t rdata_len) const
     virtual RdataPtr create(InputBuffer& buffer, size_t rdata_len) const
-    { return RdataPtr(new in::A(buffer, rdata_len)); }
+    { return (RdataPtr(new in::A(buffer, rdata_len))); }
     virtual RdataPtr create(const Rdata& source) const
     virtual RdataPtr create(const Rdata& source) const
-    { return RdataPtr(new in::A(dynamic_cast<const in::A&>(source))); }
+    { return (RdataPtr(new in::A(dynamic_cast<const in::A&>(source)))); }
 };
 };
 
 
 TEST_F(RRParamRegistryTest, addRemoveFactory)
 TEST_F(RRParamRegistryTest, addRemoveFactory)

+ 2 - 2
src/lib/dns/tests/unittest_util.cc

@@ -158,7 +158,7 @@ UnitTestUtil::matchWireData(const char* dataexp1 UNUSED_PARAM,
             << "Expected: " << len2 << "\n";
             << "Expected: " << len2 << "\n";
         return (::testing::AssertionFailure(msg));
         return (::testing::AssertionFailure(msg));
     }
     }
-    return ::testing::AssertionSuccess();
+    return (::testing::AssertionSuccess());
 }
 }
 
 
 ::testing::AssertionResult
 ::testing::AssertionResult
@@ -177,5 +177,5 @@ UnitTestUtil::matchName(const char* nameexp1 UNUSED_PARAM,
             << "Other: " << name2 << "\n";
             << "Other: " << name2 << "\n";
         return (::testing::AssertionFailure(msg));
         return (::testing::AssertionFailure(msg));
     }
     }
-    return ::testing::AssertionSuccess();
+    return (::testing::AssertionSuccess());
 }
 }

+ 1 - 1
src/lib/dns/util/base16_from_binary.h

@@ -46,7 +46,7 @@ struct from_4_bit {
             "0123456789"
             "0123456789"
             "ABCDEF";
             "ABCDEF";
         assert(t < 16);
         assert(t < 16);
-        return lookup_table[static_cast<size_t>(t)];
+        return (lookup_table[static_cast<size_t>(t)]);
     }
     }
 };
 };
 
 

+ 1 - 1
src/lib/dns/util/base32hex_from_binary.h

@@ -48,7 +48,7 @@ struct from_5_bit {
             "0123456789"
             "0123456789"
             "ABCDEFGHIJKLMNOPQRSTUV";
             "ABCDEFGHIJKLMNOPQRSTUV";
         assert(t < 32);
         assert(t < 32);
-        return lookup_table[static_cast<size_t>(t)];
+        return (lookup_table[static_cast<size_t>(t)]);
     }
     }
 };
 };
 
 

+ 1 - 1
src/lib/dns/util/binary_from_base16.h

@@ -56,7 +56,7 @@ struct to_4_bit {
             isc_throw(isc::BadValue,
             isc_throw(isc::BadValue,
                       "attempt to decode a value not in base16 char set");
                       "attempt to decode a value not in base16 char set");
         }
         }
-        return value;
+        return (value);
     }
     }
 };
 };
 
 

+ 1 - 1
src/lib/dns/util/binary_from_base32hex.h

@@ -59,7 +59,7 @@ struct to_5_bit {
             isc_throw(isc::BadValue,
             isc_throw(isc::BadValue,
                       "attempt to decode a value not in base32hex char set");
                       "attempt to decode a value not in base32hex char set");
         }
         }
-        return value;
+        return (value);
     }
     }
 };
 };
 
 

+ 2 - 2
src/lib/dns/util/sha1.cc

@@ -85,9 +85,9 @@ SHA1AddLength(SHA1Context *context, uint32_t length) {
     uint32_t addTemp = context->Length_Low;
     uint32_t addTemp = context->Length_Low;
     context->Length_Low += length;
     context->Length_Low += length;
     if (context->Length_Low < addTemp && ++context->Length_High == 0) {
     if (context->Length_Low < addTemp && ++context->Length_High == 0) {
-        return true;
+        return (true);
     } else {
     } else {
-        return false;
+        return (false);
     }
     }
 }
 }
 
 

+ 9 - 12
src/lib/xfr/fdshare_python.cc

@@ -23,25 +23,23 @@
 #include <xfr/fd_share.h>
 #include <xfr/fd_share.h>
 
 
 static PyObject*
 static PyObject*
-fdshare_recv_fd(PyObject *self UNUSED_PARAM, PyObject *args)
-{
+fdshare_recv_fd(PyObject *self UNUSED_PARAM, PyObject *args) {
     int sock, fd;
     int sock, fd;
     if (!PyArg_ParseTuple(args, "i", &sock)) {
     if (!PyArg_ParseTuple(args, "i", &sock)) {
-        return NULL;
+        return (NULL);
     }
     }
     fd = isc::xfr::recv_fd(sock);
     fd = isc::xfr::recv_fd(sock);
-    return Py_BuildValue("i", fd);
+    return (Py_BuildValue("i", fd));
 }
 }
 
 
 static PyObject*
 static PyObject*
-fdshare_send_fd(PyObject *self UNUSED_PARAM, PyObject *args)
-{
+fdshare_send_fd(PyObject *self UNUSED_PARAM, PyObject *args) {
     int sock, fd, result;
     int sock, fd, result;
     if (!PyArg_ParseTuple(args, "ii", &sock, &fd)) {
     if (!PyArg_ParseTuple(args, "ii", &sock, &fd)) {
-        return NULL;
+        return (NULL);
     }
     }
     result = isc::xfr::send_fd(sock, fd);
     result = isc::xfr::send_fd(sock, fd);
-    return Py_BuildValue("i", result);
+    return (Py_BuildValue("i", result));
 }
 }
 
 
 static PyMethodDef fdshare_Methods[] = {
 static PyMethodDef fdshare_Methods[] = {
@@ -64,13 +62,12 @@ static PyModuleDef bind10_fdshare_python = {
 };
 };
 
 
 PyMODINIT_FUNC
 PyMODINIT_FUNC
-PyInit_libxfr_python(void)
-{
+PyInit_libxfr_python(void) {
     PyObject *mod = PyModule_Create(&bind10_fdshare_python);
     PyObject *mod = PyModule_Create(&bind10_fdshare_python);
     if (mod == NULL) {
     if (mod == NULL) {
-        return NULL;
+        return (NULL);
     }
     }
 
 
-    return mod;
+    return (mod);
 }
 }
 
 

+ 1 - 1
src/lib/xfr/xfrout_client.cc

@@ -101,7 +101,7 @@ XfroutClient::sendXfroutRequestInfo(const int tcp_sock,
                   "xfr query hasn't been processed properly by xfrout module");
                   "xfr query hasn't been processed properly by xfrout module");
     }
     }
 
 
-    return 0;
+    return (0);
 }
 }
 
 
 } // End for xfr
 } // End for xfr