]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5585] Minor fixes as a result of the review.
authorMarcin Siodelski <marcin@isc.org>
Wed, 2 May 2018 14:21:47 +0000 (16:21 +0200)
committerMarcin Siodelski <marcin@isc.org>
Wed, 2 May 2018 14:21:47 +0000 (16:21 +0200)
- Adjusted accessors to fit the coding style
- Typos corrected
- Passing objects by reference to avoid cppcheck complaints

src/lib/dhcpsrv/lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h

index 79aec3476e94c3cf6a588a8241c9d45a4e766a5a..fd43daa9fa5ac8a6811eff7dfb8d4f8ba0794240 100644 (file)
@@ -186,15 +186,21 @@ public:
     virtual bool getNextRow(LeaseStatsRow& row);
 
     /// @brief Returns the value of first subnet ID specified (or zero)
-    SubnetID getFirstSubnetID() const { return first_subnet_id_; };
+    SubnetID getFirstSubnetID() const {
+        return (first_subnet_id_);
+    };
 
     /// @brief Returns the value of last subnet ID specified (or zero)
-    SubnetID getLastSubnetID() const { return last_subnet_id_; };
+    SubnetID getLastSubnetID() const {
+        return (last_subnet_id_);
+    };
 
     /// @brief Returns the selection criteria mode
     /// The value returned is based upon the constructor variant used
     /// and it indicates which query variant will be executed.
-    SelectMode getSelectMode() const { return select_mode_;  };
+    SelectMode getSelectMode() const {
+        return (select_mode_);
+    };
 
 private:
     /// @brief First (or only) subnet_id in the selection criteria
index 3a352beb5de734945c9370aafa6e0e6b80500ebd..3af59246a823197be8450036e07f3a46f2776737 100644 (file)
@@ -688,7 +688,7 @@ public:
 
     /// @brief Creates and runs the IPv6 lease stats query for a single subnet
     ///
-    /// It creates an instance of a MemfileLeaseStatsQuery4 for a subnet range
+    /// It creates an instance of a MemfileLeaseStatsQuery6 for a subnet range
     /// query and then invokes its start method in which the query constructs its
     /// statistical data result set.  The query object is then returned.
     ///
index 5ce6c485c27d18d32d1facb0ec2ff1d92a7444bf..cae09c8147d3afc4d621399859681eb2fb570e35 100644 (file)
@@ -2858,8 +2858,8 @@ LeaseMgrDbLostCallbackTest::testDbLostCallback() {
 }
 
 void
-GenericLeaseMgrTest::checkQueryAgainstRowSet(LeaseStatsQueryPtr query,
-                                             RowSet& expected_rows) {
+GenericLeaseMgrTest::checkQueryAgainstRowSet(const LeaseStatsQueryPtr& query,
+                                             const RowSet& expected_rows) {
     ASSERT_TRUE(query) << "query is null";
 
     int rows_matched = 0;
@@ -2962,7 +2962,7 @@ GenericLeaseMgrTest::testLeaseStatsQuery4() {
     // Test a single subnet
     {
         SCOPED_TRACE("SINGLE SUBNET");
-        // Add expected row for Subnet 2
+        // Add expected rows for Subnet 2
         expected_rows.insert(LeaseStatsRow(2, Lease::STATE_DEFAULT, 0));
         expected_rows.insert(LeaseStatsRow(2, Lease::STATE_DECLINED, 1));
         // Start the query
index d0a69ff6d35368918eddaf18abe2537119b5c571..09b0be7520db0d41f9701aa18e278974c5e939da 100644 (file)
@@ -424,7 +424,7 @@ public:
     ///
     /// @param qry - a started LeaseStatsQuery
     /// @param row_set - set of rows expected to be found in the query rows
-    void checkQueryAgainstRowSet(LeaseStatsQueryPtr qry, RowSet& row_set);
+    void checkQueryAgainstRowSet(const LeaseStatsQueryPtr& qry, const RowSet& row_set);
 
     /// @brief String forms of IPv4 addresses
     std::vector<std::string>  straddress4_;