]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3665] Some trivial changes as a result of the review.
authorMarcin Siodelski <marcin@isc.org>
Thu, 5 Feb 2015 17:20:56 +0000 (18:20 +0100)
committerMarcin Siodelski <marcin@isc.org>
Thu, 5 Feb 2015 17:20:56 +0000 (18:20 +0100)
src/bin/lfc/lfc_controller.h
src/bin/lfc/tests/lfc_controller_unittests.cc

index 560d285992cb7649d125fc58c032fc91d41d2022..837f75852c1fb9cf93b486aa2fbe769c098e8aaf 100644 (file)
@@ -62,7 +62,7 @@ public:
     /// of the process.  Provides the control logic to combine
     /// two lease files and weed out duplicate and expired leases.
     /// A description of the design can be found at
-    /// http://kea.isc.org/wiki/LFCDesign#no1
+    /// http://kea.isc.org/wiki/LFCDesign
     ///
     /// -# parse command line arguments
     /// -# verify that it is the only instance
@@ -176,9 +176,11 @@ private:
     /// should be short (false) or extended (true)
     std::string getVersion(const bool extended) const;
 
-    /// @brief Process files.  Read in the leases from any previous & copy
-    /// files we have and write the results out to the output file.  Upon
-    /// completion of the write move the file to the finish file.
+    /// @brief Process files.
+    ///
+    /// Read in the leases from any previous & copy files we have and
+    /// write the results out to the output file.  Upon completion of
+    /// the write move the file to the finish file.
     ///
     /// @tparam LeaseObjectType A @c Lease4 or @c Lease6.
     /// @tparam LeaseFileType A @c CSVLeaseFile4 or @c CSVLeaseFile6.
index 28edafd8fa71a097cf163efe51ecc225312be439..69de34dac4a0aa1d975d6774d800fa3cc027fec1 100644 (file)
@@ -45,10 +45,7 @@ public:
     ///
     /// @returns true if the file doesn't exist, false if it does
     bool noExist(const std::string& filename) const {
-        if ((remove(filename.c_str()) != 0) && (errno == ENOENT)) {
-            return (true);
-        }
-        return (false);
+        return ((remove(filename.c_str()) != 0) && (errno == ENOENT));
     }
 
     /// @brief Test if any of the temporary (copy, output or finish)
@@ -56,10 +53,7 @@ public:
     ///
     /// @returns true if no files exist, and false if any do.
     bool noExistIOF() const {
-        if (noExist(istr_) && noExist(ostr_) && noExist(fstr_)) {
-            return (true);
-        }
-        return (false);
+        return (noExist(istr_) && noExist(ostr_) && noExist(fstr_));
     }
 
     /// @brief Test if any of the temporary (copy, output or finish)
@@ -67,11 +61,8 @@ public:
     ///
     /// @returns true if no files exist, and false if any do.
     bool noExistIOFP() const {
-        if (noExist(istr_) && noExist(ostr_) &&
-            noExist(fstr_) && noExist(pstr_)) {
-            return (true);
-        }
-        return (false);
+        return ((noExist(istr_) && noExist(ostr_) &&
+                 noExist(fstr_) && noExist(pstr_)));
     }
 
     /// @brief Remove any files we may have created