Browse Source

[3687] Trivial fixes: typos and indentation.

Marcin Siodelski 10 years ago
parent
commit
37c0847296
3 changed files with 9 additions and 9 deletions
  1. 2 2
      src/lib/util/pid_file.cc
  2. 5 5
      src/lib/util/pid_file.h
  3. 2 2
      src/lib/util/tests/pid_file_unittest.cc

+ 2 - 2
src/lib/util/pid_file.cc

@@ -78,8 +78,8 @@ PIDFile::write(int pid) {
 void
 PIDFile::deleteFile() {
     if (remove(filename_.c_str()) != 0) {
-	isc_throw(PIDFileError, "Unable to delete PID file '"
-		  << filename_ << "'");
+        isc_throw(PIDFileError, "Unable to delete PID file '"
+                  << filename_ << "'");
     }
 }
 

+ 5 - 5
src/lib/util/pid_file.h

@@ -27,12 +27,12 @@ namespace util {
 class PIDFileError : public Exception {
 public:
     PIDFileError(const char* file, size_t line, const char* what) :
-    isc::Exception(file, line, what) { };
+        isc::Exception(file, line, what) { };
 };
 
 /// @brief Class to help with processing PID files
 ///
-/// This is a utility class to manipulate PID files.  It provides
+/// This is a utility class to manipulate PID file. It provides
 /// functions for writing and deleting a file containing a PID as
 /// well as for extracting a PID from a file and checking if the
 /// process is still running.
@@ -50,7 +50,7 @@ public:
     /// @brief Read the PID in from the file and check it.
     ///
     /// Read the PID in from the file then use it to see if
-    /// a process with that PID exists.  If the file doesn't
+    /// a process with that PID exists. If the file doesn't
     /// exist treat it as the process not being there.
     /// If the file exists but can't be read or it doesn't have
     /// the proper format treat it as the process existing.
@@ -61,10 +61,10 @@ public:
     /// @brief Write the PID to the file.
     void write(int);
 
-    /// @brief Get PID of the proces and write it to the file.
+    /// @brief Get PID of the current process and write it to the file.
     void write();
 
-    /// @brief Delete the file.
+    /// @brief Delete the PID file.
     void deleteFile();
 
     /// @brief Returns the path to the PID file.

+ 2 - 2
src/lib/util/tests/pid_file_unittest.cc

@@ -21,7 +21,7 @@ using namespace isc::util;
 
 #define TESTNAME "./pid_file.test"
 
-/// @brief Test file writing and deleteion. Start by removing
+/// @brief Test file writing and deletion. Start by removing
 /// any leftover file. Then write a known PID to the file and
 /// attempt to read the file and verify the PID. Next write
 /// a second and verify a second PID to verify that an existing
@@ -38,7 +38,7 @@ TEST(PIDFileTest, writeAndDelete) {
     // Write a known process id
     pid_file.write(10);
 
-    // Read the file and comapre the pid
+    // Read the file and compare the pid
     fs.open(TESTNAME, std::ifstream::in);
     fs >> pid;
     EXPECT_TRUE(fs.good());