Browse Source

[1975] Minor: braces, comments

Michal 'vorner' Vaner 13 years ago
parent
commit
7dcf7f71a9

+ 5 - 8
src/lib/datasrc/client_list.cc

@@ -75,7 +75,7 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
             datasrc_client(NULL),
             matched_labels(0),
             matched(false)
-        { }
+        {}
         DataSourceClient* datasrc_client;
         ZoneFinderPtr finder;
         uint8_t matched_labels;
@@ -97,7 +97,7 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
         const DataSourceClient::FindResult result(
             info.data_src_client_->findZone(name));
         switch (result.code) {
-            case result::SUCCESS: {
+            case result::SUCCESS:
                 // If we found an exact match, we have no hope to getting
                 // a better one. Stop right here.
 
@@ -105,8 +105,7 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
                 // and the need_updater parameter is true, get the zone there.
                 return (FindResult(info.data_src_client_, result.zone_finder,
                                    true));
-            }
-            case result::PARTIALMATCH: {
+            case result::PARTIALMATCH:
                 if (!want_exact_match) {
                     // In case we have a partial match, check if it is better
                     // than what we have. If so, replace it.
@@ -132,11 +131,9 @@ ConfigurableClientList::find(const dns::Name& name, bool want_exact_match,
                     }
                 }
                 break;
-            }
-            default: {
+            default:
                 // Nothing found, nothing to do.
-                ;
-            }
+                break;
         }
     }
 

+ 6 - 6
src/lib/datasrc/client_list.h

@@ -70,7 +70,7 @@ public:
             dsrc_client_(dsrc_client),
             finder_(finder),
             exact_match_(exact_match)
-        { }
+        {}
 
         /// \brief Negative answer constructor.
         ///
@@ -79,7 +79,7 @@ public:
         FindResult() :
             dsrc_client_(NULL),
             exact_match_(false)
-        { }
+        {}
 
         /// \brief Comparison operator.
         ///
@@ -97,8 +97,8 @@ public:
         /// If no such data source exists, this is NULL pointer.
         ///
         /// Note that the pointer is valid only as long the ClientList which
-        /// returned is alive and was not reconfigured. The ownership is
-        /// preserved within the ClientList.
+        /// returned the pointer is alive and was not reconfigured. The
+        /// ownership is preserved within the ClientList.
         DataSourceClient* const dsrc_client_;
 
         /// \brief The finder for the requested zone.
@@ -188,7 +188,7 @@ public:
     public:
         ConfigurationError(const char* file, size_t line, const char* what) :
             Exception(file, line, what)
-        { }
+        {}
     };
 
     /// \brief Sets the configuration.
@@ -232,7 +232,7 @@ public:
                        const DataSourceClientContainerPtr& container) :
             data_src_client_(data_src_client),
             container_(container)
-        { }
+        {}
         DataSourceClient* data_src_client_;
         DataSourceClientContainerPtr container_;
     };

+ 2 - 2
src/lib/datasrc/tests/client_list_unittest.cc

@@ -37,7 +37,7 @@ public:
     public:
         Finder(const Name& origin) :
             origin_(origin)
-        { }
+        {}
         Name getOrigin() const { return (origin_); }
         // The rest is not to be called, so just have them
         RRClass getClass() const {
@@ -75,7 +75,7 @@ public:
                          const ConstElementPtr& configuration) :
         type_(type),
         configuration_(configuration)
-    { }
+    {}
     virtual FindResult findZone(const Name& name) const {
         if (zones.empty()) {
             return (FindResult(result::NOTFOUND, ZoneFinderPtr()));