From a6cd75a596a5047bd2c0512e54becd3b86061ffd Mon Sep 17 00:00:00 2001
From: a1346054 <36859588+a1346054@users.noreply.github.com>
Date: Sun, 12 Sep 2021 19:31:41 +0000
Subject: [PATCH] Fix spelling

---
 makerelease-osx.mk        | 2 +-
 src/AppleTLSContext.cc    | 2 +-
 src/DHTSetup.h            | 2 +-
 src/DiskWriter.h          | 2 +-
 src/HttpHeaderProcessor.h | 2 +-
 src/Netrc.cc              | 2 +-
 src/PeerListenCommand.h   | 2 +-
 src/SeedCriteria.h        | 2 +-
 src/WrDiskCache.h         | 2 +-
 src/bittorrent_helper.h   | 2 +-
 src/option_processing.cc  | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/makerelease-osx.mk b/makerelease-osx.mk
index 28548a73..2c23abb1 100644
--- a/makerelease-osx.mk
+++ b/makerelease-osx.mk
@@ -238,7 +238,7 @@ endef
 export ARIA2_DISTXML
 
 
-# Detect numer of CPUs to be used with make -j
+# Detect number of CPUs to be used with make -j
 CPUS = $(shell sysctl hw.ncpu | cut -d" " -f2)
 
 
diff --git a/src/AppleTLSContext.cc b/src/AppleTLSContext.cc
index 82bfe84c..ff749f8c 100644
--- a/src/AppleTLSContext.cc
+++ b/src/AppleTLSContext.cc
@@ -131,7 +131,7 @@ struct hash_finder {
 
 std::string errToString(OSStatus err)
 {
-  std::string rv = "Unkown error";
+  std::string rv = "Unknown error";
   CFRef<CFStringRef> cerr(SecCopyErrorMessageString(err, nullptr));
   if (!cerr) {
     return rv;
diff --git a/src/DHTSetup.h b/src/DHTSetup.h
index 30eb8a42..7a04d8a1 100644
--- a/src/DHTSetup.h
+++ b/src/DHTSetup.h
@@ -52,7 +52,7 @@ public:
   ~DHTSetup();
 
   // Returns two vector of Commands.  First one contains regular
-  // commands.  Secod one contains so called routine commands, which
+  // commands.  Second one contains so called routine commands, which
   // executed once per event poll returns.
   std::pair<std::vector<std::unique_ptr<Command>>,
             std::vector<std::unique_ptr<Command>>>
diff --git a/src/DiskWriter.h b/src/DiskWriter.h
index 03a4147b..2fed66d6 100644
--- a/src/DiskWriter.h
+++ b/src/DiskWriter.h
@@ -62,7 +62,7 @@ public:
   virtual void closeFile() = 0;
 
   /**
-   * Opens a file.  If the file doesnot exists, an exception may be
+   * Opens a file.  If the file does not exist, an exception may be
    * thrown.
    */
   virtual void openExistingFile(int64_t totalLength = 0) = 0;
diff --git a/src/HttpHeaderProcessor.h b/src/HttpHeaderProcessor.h
index deff890e..f66e0a20 100644
--- a/src/HttpHeaderProcessor.h
+++ b/src/HttpHeaderProcessor.h
@@ -61,7 +61,7 @@ public:
   bool parse(const std::string& data);
 
   /**
-   * Retruns the number of bytes processed in the last invocation of
+   * Returns the number of bytes processed in the last invocation of
    * parse().
    */
   size_t getLastBytesProcessed() const;
diff --git a/src/Netrc.cc b/src/Netrc.cc
index 005f3162..d6cbbe52 100644
--- a/src/Netrc.cc
+++ b/src/Netrc.cc
@@ -179,7 +179,7 @@ void Netrc::parse(const std::string& path)
         else {
           if (!authenticator) {
             throw DL_ABORT_EX(
-                fmt("Netrc:parse error. %s encounterd where 'machine'"
+                fmt("Netrc:parse error. %s encountered where 'machine'"
                     " or 'default' expected.",
                     std::string((*iter).first, (*iter).second).c_str()));
           }
diff --git a/src/PeerListenCommand.h b/src/PeerListenCommand.h
index 13003c01..ecf5f2ae 100644
--- a/src/PeerListenCommand.h
+++ b/src/PeerListenCommand.h
@@ -60,7 +60,7 @@ public:
   virtual bool execute() CXX11_OVERRIDE;
 
   /**
-   * Binds port. If successful, the bound port number is assinged to port and
+   * Binds port. If successful, the bound port number is assigned to port and
    * returns true, otherwise port is undefined and returns false.
    */
   bool bindPort(uint16_t& port, SegList<int>& seq);
diff --git a/src/SeedCriteria.h b/src/SeedCriteria.h
index 77c98826..0765b5c0 100644
--- a/src/SeedCriteria.h
+++ b/src/SeedCriteria.h
@@ -49,7 +49,7 @@ public:
   virtual bool evaluate() = 0;
 
   /**
-   * Used for reseting status.
+   * Used for resetting status.
    */
   virtual void reset() = 0;
 };
diff --git a/src/WrDiskCache.h b/src/WrDiskCache.h
index c70d1ccc..a9cede2f 100644
--- a/src/WrDiskCache.h
+++ b/src/WrDiskCache.h
@@ -52,7 +52,7 @@ public:
   // Adds the cache entry |ent| to the storage. The size of cached
   // data of ent is added to total_.
   bool add(WrDiskCacheEntry* ent);
-  // Removes the cache entry |ent| from the stroage. The size of
+  // Removes the cache entry |ent| from the storage. The size of
   // cached data of ent is subtracted from total_.
   bool remove(WrDiskCacheEntry* ent);
   // Updates the already added entry |ent|. The |delta| means how many
diff --git a/src/bittorrent_helper.h b/src/bittorrent_helper.h
index a8886012..ea1a6277 100644
--- a/src/bittorrent_helper.h
+++ b/src/bittorrent_helper.h
@@ -210,7 +210,7 @@ void createPeerMessageString(unsigned char* msg, size_t msgLength,
                              size_t payloadLength, uint8_t messageId);
 
 /**
- * Creates compact form(packed addresss + 2bytes port) and stores the
+ * Creates compact form(packed address + 2bytes port) and stores the
  * results in compact.  This function looks addr and if it is IPv4
  * address, it stores 6bytes in compact and if it is IPv6, it stores
  * 18bytes in compact.  So compact must be at least 18 bytes and
diff --git a/src/option_processing.cc b/src/option_processing.cc
index f9891fed..a671b23a 100644
--- a/src/option_processing.cc
+++ b/src/option_processing.cc
@@ -275,7 +275,7 @@ error_code::Value option_processing(Option& op, bool standalone,
     // we must clear eof bit and seek to the beginning of the buffer.
     cmdstream.clear();
     cmdstream.seekg(0, std::ios::beg);
-    // finaly let's parse and store command-iine options.
+    // finally let's parse and store command-line options.
     op.setParent(confOption);
     oparser->parse(op, cmdstream);
     oparser->parse(op, options);