[tor-commits] [tor/master] Fix typos.

dgoulet at torproject.org dgoulet at torproject.org
Thu Nov 12 16:49:14 UTC 2020


commit 4a0cd79588d2a472ab81e4f1d0e1e1bf6f2b390c
Author: Samanta Navarro <ferivoz at riseup.net>
Date:   Wed Nov 11 11:38:19 2020 +0000

    Fix typos.
    
    Typos found with codespell.
    
    Please keep in mind that this should have impact on actual code
    and must be carefully evaluated:
    
    src/core/or/lttng_circuit.inc
    -    ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
    +    ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
---
 .gitlab-ci.yml                               |  2 +-
 configure.ac                                 |  2 +-
 contrib/or-tools/exitlist                    |  2 +-
 doc/HACKING/GettingStartedRust.md            |  2 +-
 doc/HACKING/ReleaseSeriesLifecycle.md        |  2 +-
 doc/HACKING/tracing/README.md                |  4 ++--
 doc/TUNING                                   |  2 +-
 m4/pc_from_ucontext.m4                       |  2 +-
 m4/pkg.m4                                    |  2 +-
 scripts/ci/ci-driver.sh                      |  2 +-
 scripts/git/git-setup-dirs.sh                |  2 +-
 scripts/git/pre-commit.git-hook              |  2 +-
 scripts/maint/annotate_ifdef_directives.py   |  2 +-
 scripts/maint/codetool.py                    |  2 +-
 scripts/maint/rename_c_identifier.py         |  2 +-
 src/app/config/config.c                      |  8 ++++----
 src/app/config/or_options_st.h               |  2 +-
 src/app/config/or_state_st.h                 |  2 +-
 src/app/config/resolve_addr.h                |  2 +-
 src/config/torrc.minimal.in-staging          |  2 +-
 src/config/torrc.sample.in                   |  2 +-
 src/core/mainloop/cpuworker.c                |  2 +-
 src/core/mainloop/mainloop.c                 |  2 +-
 src/core/mainloop/netstatus.c                |  2 +-
 src/core/mainloop/periodic.c                 |  2 +-
 src/core/or/channel.c                        |  4 ++--
 src/core/or/circuitbuild.c                   |  2 +-
 src/core/or/circuitmux.h                     |  2 +-
 src/core/or/circuitpadding.c                 | 10 +++++-----
 src/core/or/circuitpadding_machines.c        |  2 +-
 src/core/or/circuituse.c                     | 10 +++++-----
 src/core/or/connection_edge.c                | 12 ++++++------
 src/core/or/lttng_circuit.inc                |  4 ++--
 src/core/or/onion.h                          |  2 +-
 src/core/or/or_connection_st.h               |  4 ++--
 src/core/or/origin_circuit_st.h              |  2 +-
 src/core/or/policies.c                       |  2 +-
 src/core/or/sendme.c                         |  2 +-
 src/core/or/server_port_cfg_st.h             |  2 +-
 src/core/proto/proto_socks.c                 |  2 +-
 src/ext/curve25519_donna/README              |  2 +-
 src/ext/ed25519/donna/README.md              | 10 +++++-----
 src/ext/ed25519/donna/fuzz/build-nix.php     |  2 +-
 src/ext/ed25519/donna/test-internals.c       |  2 +-
 src/feature/client/addressmap.c              |  4 ++--
 src/feature/client/bridges.c                 |  2 +-
 src/feature/client/circpathbias.c            |  2 +-
 src/feature/client/entrynodes.c              |  4 ++--
 src/feature/client/transports.c              |  4 ++--
 src/feature/control/control.c                |  2 +-
 src/feature/control/getinfo_geoip.c          |  2 +-
 src/feature/dirauth/dirauth_options.inc      |  2 +-
 src/feature/dirauth/keypin.c                 |  4 ++--
 src/feature/dirauth/shared_random.c          |  6 +++---
 src/feature/dirauth/shared_random_state.c    |  2 +-
 src/feature/dirauth/vote_microdesc_hash_st.h |  2 +-
 src/feature/dirauth/voting_schedule.h        |  2 +-
 src/feature/dircache/dircache.c              |  2 +-
 src/feature/dircommon/consdiff.c             |  4 ++--
 src/feature/dirparse/ns_parse.c              |  2 +-
 src/feature/dirparse/routerparse.c           | 10 ++++++----
 src/feature/hibernate/hibernate.h            |  2 +-
 src/feature/hs/hs_cache.c                    |  4 ++--
 src/feature/hs/hs_cell.c                     |  4 ++--
 src/feature/hs/hs_cell.h                     |  2 +-
 src/feature/hs/hs_circuit.c                  |  2 +-
 src/feature/hs/hs_circuit.h                  |  2 +-
 src/feature/hs/hs_client.c                   |  4 ++--
 src/feature/hs/hs_client.h                   |  8 ++++----
 src/feature/hs/hs_common.c                   |  2 +-
 src/feature/hs/hs_common.h                   |  2 +-
 src/feature/hs/hs_config.c                   |  4 ++--
 src/feature/hs/hs_config.h                   |  2 +-
 src/feature/hs/hs_descriptor.c               | 12 ++++++------
 src/feature/hs/hs_ident.c                    |  2 +-
 src/feature/hs/hs_ident.h                    |  2 +-
 src/feature/hs/hs_ob.c                       | 15 ++++++++-------
 src/feature/hs/hs_service.c                  | 26 +++++++++++++-------------
 src/feature/hs/hs_service.h                  | 10 +++++-----
 src/feature/keymgt/loadkey.c                 |  2 +-
 src/feature/nodelist/dirlist.c               |  2 +-
 src/feature/nodelist/nodelist.c              |  4 ++--
 src/feature/nodelist/routerlist.c            |  2 +-
 src/feature/relay/dns.c                      |  2 +-
 src/feature/relay/ext_orport.c               |  2 +-
 src/feature/relay/relay_periodic.c           |  2 +-
 src/feature/relay/selftest.c                 |  2 +-
 src/feature/rend/rendcache.c                 |  4 ++--
 src/feature/rend/rendservice.c               |  8 ++++----
 src/feature/stats/geoip_stats.c              |  2 +-
 src/feature/stats/rephist.c                  |  2 +-
 src/lib/buf/buffers.c                        |  2 +-
 src/lib/conf/conftypes.h                     |  2 +-
 src/lib/confmgt/typedvar.c                   |  2 +-
 src/lib/container/namemap.c                  |  2 +-
 src/lib/crypt_ops/crypto_dh_openssl.c        |  2 +-
 src/lib/crypt_ops/crypto_openssl_mgt.h       |  2 +-
 src/lib/dispatch/dispatch.h                  |  2 +-
 src/lib/encoding/binascii.c                  |  2 +-
 src/lib/fs/path.c                            | 10 +++++-----
 src/lib/log/log.c                            |  2 +-
 src/lib/math/prob_distr.c                    |  4 ++--
 src/lib/metrics/metrics_store.c              |  2 +-
 src/lib/net/address.c                        |  2 +-
 src/lib/net/address.h                        |  2 +-
 src/lib/process/process.c                    |  2 +-
 src/lib/process/process_win32.c              | 22 +++++++++++-----------
 src/lib/process/restrict.c                   |  2 +-
 src/lib/process/waitpid.c                    |  2 +-
 src/lib/pubsub/pub_binding_st.h              |  2 +-
 src/lib/pubsub/pubsub_build.h                |  2 +-
 src/lib/pubsub/pubsub_check.c                |  2 +-
 src/lib/pubsub/pubsub_macros.h               |  2 +-
 src/lib/subsys/initialization.md             |  4 ++--
 src/lib/subsys/subsys.h                      |  2 +-
 src/lib/time/compat_time.h                   |  2 +-
 src/lib/time/tvdiff.c                        |  2 +-
 src/lib/trace/debug.h                        |  2 +-
 src/lib/trace/trace_stub.c                   |  2 +-
 src/rust/crypto/rand/rng.rs                  |  4 ++--
 src/rust/external/crypto_digest.rs           |  6 +++---
 src/rust/tor_allocate/tor_allocate.rs        |  2 +-
 src/rust/tor_log/tor_log.rs                  |  4 ++--
 src/test/test_address.c                      |  2 +-
 src/test/test_channel.c                      |  2 +-
 src/test/test_circuitmux.c                   |  2 +-
 src/test/test_circuitpadding.c               |  6 +++---
 src/test/test_config.c                       | 12 ++++++------
 src/test/test_confparse.c                    |  2 +-
 src/test/test_consdiffmgr.c                  |  2 +-
 src/test/test_dir.c                          |  6 +++---
 src/test/test_dir_handle_get.c               |  8 ++++----
 src/test/test_dirvote.c                      |  2 +-
 src/test/test_dispatch.c                     |  2 +-
 src/test/test_geoip.c                        |  6 +++---
 src/test/test_hs_client.c                    |  2 +-
 src/test/test_hs_common.c                    |  2 +-
 src/test/test_hs_control.c                   |  4 ++--
 src/test/test_hs_service.c                   |  4 ++--
 src/test/test_metrics.c                      |  4 ++--
 src/test/test_periodic_event.c               |  2 +-
 src/test/test_prob_distr.c                   |  4 ++--
 src/test/test_process.c                      |  2 +-
 src/test/test_relaycell.c                    |  4 ++--
 src/test/test_sendme.c                       |  2 +-
 src/test/test_shared_random.c                |  4 ++--
 src/test/test_util.c                         |  6 +++---
 147 files changed, 265 insertions(+), 262 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a672d8ed39..8afd090a58 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -96,7 +96,7 @@ variables:
     - if [ "$CHUTNEY" = yes ]; then git clone --depth 1 https://git.torproject.org/chutney.git ;  export CHUTNEY_PATH="$(pwd)/chutney"; fi
     - if [ "$TRACING" = yes ]; then apt install liblttng-ust-dev; fi
 
-# Minmal check on debian: just make, make check.
+# Minimal check on debian: just make, make check.
 #
 debian-minimal:
   image: debian:stable
diff --git a/configure.ac b/configure.ac
index 5e16884f74..c880375988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1501,7 +1501,7 @@ dnl These cflags add bunches of branches, and we haven't been able to
 dnl persuade ourselves that they're suitable for code that needs to be
 dnl constant time.
 AC_SUBST(CFLAGS_BUGTRAP)
-dnl These cflags are variant ones sutable for code that needs to be
+dnl These cflags are variant ones suitable for code that needs to be
 dnl constant-time.
 AC_SUBST(CFLAGS_CONSTTIME)
 
diff --git a/contrib/or-tools/exitlist b/contrib/or-tools/exitlist
index 3fd26b5166..709e9a198c 100755
--- a/contrib/or-tools/exitlist
+++ b/contrib/or-tools/exitlist
@@ -6,7 +6,7 @@
 
 """
  exitlist -- Given a Tor directory on stdin, lists the Tor servers
- that accept connections to given addreses.
+ that accept connections to given addresses.
 
  example usage:
 
diff --git a/doc/HACKING/GettingStartedRust.md b/doc/HACKING/GettingStartedRust.md
index adacf8afc2..beef825226 100644
--- a/doc/HACKING/GettingStartedRust.md
+++ b/doc/HACKING/GettingStartedRust.md
@@ -124,7 +124,7 @@ the module calls.  Modules which call fewer other modules are better targets.
 
 Strive to change the C API as little as possible.
 
-We are currently targetting Rust stable. (See `CodingStandardsRust.md` for more
+We are currently targeting Rust stable. (See `CodingStandardsRust.md` for more
 details.)
 
 It is on our TODO list to try to cultivate good
diff --git a/doc/HACKING/ReleaseSeriesLifecycle.md b/doc/HACKING/ReleaseSeriesLifecycle.md
index e4068ed806..8536fbbd08 100644
--- a/doc/HACKING/ReleaseSeriesLifecycle.md
+++ b/doc/HACKING/ReleaseSeriesLifecycle.md
@@ -102,7 +102,7 @@ they do not apply to security-related patch release versions.
 4. Open tickets for connecting the new branches to various other
    places.  See section 2 above for a list of affected locations.
 
-5. Stop running practracker on maintainence and release branches:
+5. Stop running practracker on maintenance and release branches:
    * Remove "check-best-practices" from the check-local Makefile
      target in the maint-x.y.z branch only.
    * Delete the file scripts/maint/practracker/.enable_practracker_in_hooks
diff --git a/doc/HACKING/tracing/README.md b/doc/HACKING/tracing/README.md
index d9fb2e5341..f34709bf3a 100644
--- a/doc/HACKING/tracing/README.md
+++ b/doc/HACKING/tracing/README.md
@@ -47,7 +47,7 @@ A trace event in tor has the following standard format:
 tor_trace(subsystem, event_name, args...);
 ```
 
-The `subsystem` parameter is the name of the subsytem the trace event is in.
+The `subsystem` parameter is the name of the subsystem the trace event is in.
 For example that could be "scheduler" or "vote" or "hs". The idea is to add
 some context to the event so when we collect them we know where it's coming
 from.
@@ -135,7 +135,7 @@ This is pretty easy. Let's say you want to add a trace event in
 #include "lib/trace/events.h"
 ```
 
-Then, the `tor_trace()` macro can be used with the specific format detailled
+Then, the `tor_trace()` macro can be used with the specific format detailed
 before in a previous section. As an example:
 
 ```c
diff --git a/doc/TUNING b/doc/TUNING
index 7da37e1adc..882a6dd68d 100644
--- a/doc/TUNING
+++ b/doc/TUNING
@@ -13,7 +13,7 @@ opened on your host at the same time.
 FreeBSD
 -------
 
-Tune the followind sysctl(8) variables:
+Tune the following sysctl(8) variables:
  * kern.maxfiles - maximum allowed file descriptors (for entire system)
  * kern.maxfilesperproc - maximum file descriptors one process is allowed
    to use
diff --git a/m4/pc_from_ucontext.m4 b/m4/pc_from_ucontext.m4
index 9b66bf752c..61d979622b 100644
--- a/m4/pc_from_ucontext.m4
+++ b/m4/pc_from_ucontext.m4
@@ -54,7 +54,7 @@ AC_DEFUN([AC_PC_FROM_UCONTEXT],
    else
      AC_CHECK_HEADERS(sys/ucontext.h)       # ucontext on OS X 10.6 (at least)
    fi
-   AC_CHECK_HEADERS(cygwin/signal.h)        # ucontext on cywgin
+   AC_CHECK_HEADERS(cygwin/signal.h)        # ucontext on cygwin
    AC_MSG_CHECKING([how to access the program counter from a struct ucontext])
    pc_fields="           uc_mcontext.gregs[[REG_PC]]"  # Solaris x86 (32 + 64 bit)
    pc_fields="$pc_fields uc_mcontext.gregs[[REG_EIP]]" # Linux (i386)
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 12e9835fba..13e0550be4 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -53,7 +53,7 @@ fi[]dnl
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
+# only at the first occurrence in configure.ac, so if the first place
 # it's called might be skipped (such as if it is within an "if", you
 # have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
diff --git a/scripts/ci/ci-driver.sh b/scripts/ci/ci-driver.sh
index 67a95a1f61..c07d99188b 100755
--- a/scripts/ci/ci-driver.sh
+++ b/scripts/ci/ci-driver.sh
@@ -461,7 +461,7 @@ fi
 if [[ "${STEM}" = "yes" ]]; then
    start_section "Stem"
    if [[ "${TOR_VER_AT_LEAST_044}" = 'yes' ]]; then
-     # XXXX This shold probably be part some test-stem make target.
+     # XXXX This should probably be part of some test-stem make target.
      if runcmd timelimit -p -t 520 -s USR1 -T 30 -S ABRT \
            python3 "${STEM_PATH}/run_tests.py" \
            --tor src/app/tor \
diff --git a/scripts/git/git-setup-dirs.sh b/scripts/git/git-setup-dirs.sh
index 3cc184dafb..5a9ae41cbd 100755
--- a/scripts/git/git-setup-dirs.sh
+++ b/scripts/git/git-setup-dirs.sh
@@ -494,7 +494,7 @@ set_tor_github_pr_fetch_config
 fetch_remote "tor-github"
 
 # GitLab remote
-printf "%s Seting up remote %s\\n" "$MARKER" "${BYEL}tor-gitlab${CNRM}"
+printf "%s Setting up remote %s\\n" "$MARKER" "${BYEL}tor-gitlab${CNRM}"
 add_remote "tor-gitlab" "$GITLAB_PULL"
 set_remote_push "tor-gitlab" "$GITLAB_PUSH"
 # Add custom fetch for MRs
diff --git a/scripts/git/pre-commit.git-hook b/scripts/git/pre-commit.git-hook
index 5533ed0cdd..75e5133a73 100755
--- a/scripts/git/pre-commit.git-hook
+++ b/scripts/git/pre-commit.git-hook
@@ -3,7 +3,7 @@
 # To install this script, copy it to .git/hooks/pre-commit in local copy of
 # tor git repo and make sure it has permission to execute.
 #
-# This is pre-commit git hook script that prevents commiting your changeset if
+# This is pre-commit git hook script that prevents committing your changeset if
 # it fails our code formatting, changelog entry formatting, module include
 # rules, etc...
 
diff --git a/scripts/maint/annotate_ifdef_directives.py b/scripts/maint/annotate_ifdef_directives.py
index 9ca090d595..eeca0bbb17 100755
--- a/scripts/maint/annotate_ifdef_directives.py
+++ b/scripts/maint/annotate_ifdef_directives.py
@@ -70,7 +70,7 @@ LINE_OBVIOUSNESS_LIMIT = 4
 # Maximum line width.  This includes a terminating newline character.
 #
 # (This is the maximum before encoding, so that if the the operating system
-# uses multiple characers to encode newline, that's still okay.)
+# uses multiple characters to encode newline, that's still okay.)
 LINE_WIDTH=80
 
 class Problem(Exception):
diff --git a/scripts/maint/codetool.py b/scripts/maint/codetool.py
index 725712c0cc..c6daf759f5 100755
--- a/scripts/maint/codetool.py
+++ b/scripts/maint/codetool.py
@@ -11,7 +11,7 @@
 #
 
 """
-   This program uses a set of plugable filters to inspect and transform
+   This program uses a set of pluggable filters to inspect and transform
    our C code.
 """
 
diff --git a/scripts/maint/rename_c_identifier.py b/scripts/maint/rename_c_identifier.py
index 7794689303..8b286c1a28 100755
--- a/scripts/maint/rename_c_identifier.py
+++ b/scripts/maint/rename_c_identifier.py
@@ -153,7 +153,7 @@ This is an automated commit, generated by this command:
     if no_verify:
         msg += """
 It was generated with --no-verify, so it probably breaks some commit hooks.
-The commiter should be sure to fix them up in a subsequent commit.
+The committer should be sure to fix them up in a subsequent commit.
 """
 
     return msg
diff --git a/src/app/config/config.c b/src/app/config/config.c
index e14437aa6f..458067af4d 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -1518,7 +1518,7 @@ compute_group_readable_flag(const char *datadir,
      * the datadirectory */
     return datadir_gr;
   } else {
-    /* The directores are different, so we default to "not group-readable" */
+    /* The directories are different, so we default to "not group-readable" */
     return 0;
   }
 }
@@ -5872,9 +5872,9 @@ warn_client_dns_cache(const char *option, int disabling)
     return;
 
   warn_deprecated_option(option,
-      "Client-side DNS cacheing enables a wide variety of route-"
+      "Client-side DNS caching enables a wide variety of route-"
       "capture attacks. If a single bad exit node lies to you about "
-      "an IP address, cacheing that address would make you visit "
+      "an IP address, caching that address would make you visit "
       "an address of the attacker's choice every time you connected "
       "to your destination.");
 }
@@ -7009,7 +7009,7 @@ options_get_dir_fname2_suffix,(const or_options_t *options,
   return fname;
 }
 
-/** Check wether the data directory has a private subdirectory
+/** Check whether the data directory has a private subdirectory
  * <b>subdir</b>. If not, try to create it. Return 0 on success,
  * -1 otherwise. */
 int
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 7a72547fd3..4364f145ed 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -1041,7 +1041,7 @@ struct or_options_t {
   /** Maximum allowed burst of circuits. Reaching that value, the address is
    * detected as malicious and a defense might be used. */
   int DoSCircuitCreationBurst;
-  /** When an address is marked as malicous, what defense should be used
+  /** When an address is marked as malicious, what defense should be used
    * against it. See the dos_cc_defense_type_t enum. */
   int DoSCircuitCreationDefenseType;
   /** For how much time (in seconds) the defense is applicable for a malicious
diff --git a/src/app/config/or_state_st.h b/src/app/config/or_state_st.h
index 6769ef7b87..807f546169 100644
--- a/src/app/config/or_state_st.h
+++ b/src/app/config/or_state_st.h
@@ -21,7 +21,7 @@ struct config_suite_t;
 struct or_state_t {
   uint32_t magic_;
   /** The time at which we next plan to write the state to the disk.  Equal to
-   * TIME_MAX if there are no savable changes, 0 if there are changes that
+   * TIME_MAX if there are no saveable changes, 0 if there are changes that
    * should be saved right away. */
   time_t next_write;
 
diff --git a/src/app/config/resolve_addr.h b/src/app/config/resolve_addr.h
index 96c86eeeea..919d5d42cc 100644
--- a/src/app/config/resolve_addr.h
+++ b/src/app/config/resolve_addr.h
@@ -17,7 +17,7 @@
 /** Method used to resolved an address. In other words, how was the address
  * discovered by tor. */
 typedef enum {
-  /* Default value. Indiate that no method found the address. */
+  /* Default value. Indicate that no method found the address. */
   RESOLVED_ADDR_NONE              = 0,
   /* Found from the "Address" configuration option. */
   RESOLVED_ADDR_CONFIGURED        = 1,
diff --git a/src/config/torrc.minimal.in-staging b/src/config/torrc.minimal.in-staging
index 90bad7f7cc..7f43cd324e 100644
--- a/src/config/torrc.minimal.in-staging
+++ b/src/config/torrc.minimal.in-staging
@@ -88,7 +88,7 @@
 ## yourself to make this work.
 #ORPort 443 NoListen
 #ORPort 127.0.0.1:9090 NoAdvertise
-## If you want to listen on IPv6 your numeric address must be explictly
+## If you want to listen on IPv6 your numeric address must be explicitly
 ## between square brackets as follows. You must also listen on IPv4.
 #ORPort [2001:DB8::1]:9050
 
diff --git a/src/config/torrc.sample.in b/src/config/torrc.sample.in
index 0690cbb931..5d593871dd 100644
--- a/src/config/torrc.sample.in
+++ b/src/config/torrc.sample.in
@@ -88,7 +88,7 @@
 ## yourself to make this work.
 #ORPort 443 NoListen
 #ORPort 127.0.0.1:9090 NoAdvertise
-## If you want to listen on IPv6 your numeric address must be explictly
+## If you want to listen on IPv6 your numeric address must be explicitly
 ## between square brackets as follows. You must also listen on IPv4.
 #ORPort [2001:DB8::1]:9050
 
diff --git a/src/core/mainloop/cpuworker.c b/src/core/mainloop/cpuworker.c
index 485ddb9741..2ae7e9aaf2 100644
--- a/src/core/mainloop/cpuworker.c
+++ b/src/core/mainloop/cpuworker.c
@@ -246,7 +246,7 @@ estimated_usec_for_onionskins(uint32_t n_requests, uint16_t onionskin_type)
   if (onionskin_type > MAX_ONION_HANDSHAKE_TYPE) /* should be impossible */
     return 1000 * (uint64_t)n_requests;
   if (PREDICT_UNLIKELY(onionskins_n_processed[onionskin_type] < 100)) {
-    /* Until we have 100 data points, just asssume everything takes 1 msec. */
+    /* Until we have 100 data points, just assume everything takes 1 msec. */
     return 1000 * (uint64_t)n_requests;
   } else {
     /* This can't overflow: we'll never have more than 500000 onionskins
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c
index c75039b378..6abfe0ff39 100644
--- a/src/core/mainloop/mainloop.c
+++ b/src/core/mainloop/mainloop.c
@@ -1475,7 +1475,7 @@ get_my_roles(const or_options_t *options)
 
   /* We also consider tor to have the role of a client if the ControlPort is
    * set because a lot of things can be done over the control port which
-   * requires tor to have basic functionnalities. */
+   * requires tor to have basic functionalities. */
   int is_client = options_any_client_port_set(options) ||
                   options->ControlPort_set ||
                   options->OwningControllerFD != UINT64_MAX;
diff --git a/src/core/mainloop/netstatus.c b/src/core/mainloop/netstatus.c
index 61a3469eaa..7367c68219 100644
--- a/src/core/mainloop/netstatus.c
+++ b/src/core/mainloop/netstatus.c
@@ -72,7 +72,7 @@ note_user_activity(time_t now)
 }
 
 /**
- * Change the time at which "user activitiy" was last seen to <b>now</b>.
+ * Change the time at which "user activity" was last seen to <b>now</b>.
  *
  * Unlike note_user_actity, this function sets the time without checking
  * whether it is in the past, and without causing any rescan of periodic events
diff --git a/src/core/mainloop/periodic.c b/src/core/mainloop/periodic.c
index b5fd8fab61..29cf8c4831 100644
--- a/src/core/mainloop/periodic.c
+++ b/src/core/mainloop/periodic.c
@@ -90,7 +90,7 @@ periodic_event_dispatch(mainloop_event_t *ev, void *data)
     next_interval = r;
   } else {
     /* no action was taken, it is likely a precondition failed,
-     * we should reschedule for next second incase the precondition
+     * we should reschedule for next second in case the precondition
      * passes then */
     next_interval = 1;
   }
diff --git a/src/core/or/channel.c b/src/core/or/channel.c
index 5300a07608..26c93d169f 100644
--- a/src/core/or/channel.c
+++ b/src/core/or/channel.c
@@ -32,7 +32,7 @@
  *
  * NOTE: For now, the separation between channels and specialized channels
  * (like channeltls) is not that well defined. So the channeltls layer calls
- * channel_process_cell() which originally comes from the connection subsytem.
+ * channel_process_cell() which originally comes from the connection subsystem.
  * This should be hopefully be fixed with #23993.
  *
  * For *outbound* cells, the entry point is: channel_write_packed_cell().
@@ -2387,7 +2387,7 @@ channel_is_better(channel_t *a, channel_t *b)
  * Get a channel to extend a circuit.
  *
  * Given the desired relay identity, pick a suitable channel to extend a
- * circuit to the target IPv4 or IPv6 address requsted by the client. Search
+ * circuit to the target IPv4 or IPv6 address requested by the client. Search
  * for an existing channel for the requested endpoint. Make sure the channel
  * is usable for new circuits, and matches one of the target addresses.
  *
diff --git a/src/core/or/circuitbuild.c b/src/core/or/circuitbuild.c
index af38014c69..ea32a5bc57 100644
--- a/src/core/or/circuitbuild.c
+++ b/src/core/or/circuitbuild.c
@@ -7,7 +7,7 @@
 /**
  * \file circuitbuild.c
  *
- * \brief Implements the details of building circuits (by chosing paths,
+ * \brief Implements the details of building circuits (by choosing paths,
  * constructing/sending create/extend cells, and so on).
  *
  * On the client side, this module handles launching circuits. Circuit
diff --git a/src/core/or/circuitmux.h b/src/core/or/circuitmux.h
index 191ca12e30..5e41ccc6ca 100644
--- a/src/core/or/circuitmux.h
+++ b/src/core/or/circuitmux.h
@@ -127,7 +127,7 @@ MOCK_DECL(unsigned int, circuitmux_num_cells, (circuitmux_t *cmux));
 unsigned int circuitmux_num_circuits(circuitmux_t *cmux);
 unsigned int circuitmux_num_active_circuits(circuitmux_t *cmux);
 
-/* Debuging interface - slow. */
+/* Debugging interface - slow. */
 int64_t circuitmux_count_queued_destroy_cells(const channel_t *chan,
                                               const circuitmux_t *cmux);
 
diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index e6daba5469..6dfe94de01 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -1536,7 +1536,7 @@ circpad_machine_schedule_padding,(circpad_machine_runtime_t *mi))
 /**
  * If the machine transitioned to the END state, we need
  * to check to see if it wants us to shut it down immediately.
- * If it does, then we need to send the appropiate negotiation commands
+ * If it does, then we need to send the appropriate negotiation commands
  * depending on which side it is.
  *
  * After this function is called, mi may point to freed memory. Do
@@ -2076,7 +2076,7 @@ circpad_machine_conditions_keep(origin_circuit_t *circ,
  *
  * The padding code only cares if the circuit is building,
  * opened, used for streams, and/or still has relay early cells.
- * This returns a bitmask of all state properities that apply to
+ * This returns a bitmask of all state properties that apply to
  * this circuit.
  */
 static inline
@@ -2390,7 +2390,7 @@ circpad_deliver_unrecognized_cell_events(circuit_t *circ,
  * Deliver circpad events for "recognized" relay cells.
  *
  * Recognized cells are destined for this hop, either client or middle.
- * Check if this is a padding cell or not, and send the appropiate
+ * Check if this is a padding cell or not, and send the appropriate
  * received event.
  */
 void
@@ -2682,7 +2682,7 @@ circpad_circ_responder_machine_init(void)
      serialize this into the consensus or the torrc */
 
   /* We transition to the burst state on padding receive and on non-padding
-   * recieve */
+   * receive */
   circ_responder_machine->states[CIRCPAD_STATE_START].
       next_state[CIRCPAD_EVENT_PADDING_RECV] = CIRCPAD_STATE_BURST;
   circ_responder_machine->states[CIRCPAD_STATE_START].
@@ -2711,7 +2711,7 @@ circpad_circ_responder_machine_init(void)
   /* During burst state we wait forever for padding to arrive.
 
      We are waiting for a padding cell from the client to come in, so that we
-     respond, and we immitate how extend looks like */
+     respond, and we imitate how extend looks like */
   circ_responder_machine->states[CIRCPAD_STATE_BURST].histogram[0] = 0;
   // Only infinity bin:
   circ_responder_machine->states[CIRCPAD_STATE_BURST].histogram[1] = 1;
diff --git a/src/core/or/circuitpadding_machines.c b/src/core/or/circuitpadding_machines.c
index 1e6b580f5b..f29a9be455 100644
--- a/src/core/or/circuitpadding_machines.c
+++ b/src/core/or/circuitpadding_machines.c
@@ -25,7 +25,7 @@
  * Client-side introduction circuit hiding machine:
  *
  *    This machine hides client-side introduction circuits by making their
- *    circuit consruction sequence look like normal general circuits that
+ *    circuit construction sequence look like normal general circuits that
  *    download directory information. Furthermore, the circuits are kept open
  *    until all the padding has been sent, since intro circuits are usually
  *    very short lived and this act as a distinguisher. For more info see
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index ace68cea53..0f3fc29361 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -1991,7 +1991,7 @@ circuit_purpose_is_hidden_service(uint8_t purpose)
   return 0;
 }
 
-/** Retrun true iff the given circuit is an HS client circuit. */
+/** Return true iff the given circuit is an HS client circuit. */
 bool
 circuit_purpose_is_hs_client(const uint8_t purpose)
 {
@@ -1999,7 +1999,7 @@ circuit_purpose_is_hs_client(const uint8_t purpose)
           purpose <= CIRCUIT_PURPOSE_C_HS_MAX_);
 }
 
-/** Retrun true iff the given circuit is an HS service circuit. */
+/** Return true iff the given circuit is an HS service circuit. */
 bool
 circuit_purpose_is_hs_service(const uint8_t purpose)
 {
@@ -2007,14 +2007,14 @@ circuit_purpose_is_hs_service(const uint8_t purpose)
           purpose <= CIRCUIT_PURPOSE_S_HS_MAX_);
 }
 
-/** Retrun true iff the given circuit is an HS Vanguards circuit. */
+/** Return true iff the given circuit is an HS Vanguards circuit. */
 bool
 circuit_purpose_is_hs_vanguards(const uint8_t purpose)
 {
   return (purpose == CIRCUIT_PURPOSE_HS_VANGUARDS);
 }
 
-/** Retrun true iff the given circuit is an HS v2 circuit. */
+/** Return true iff the given circuit is an HS v2 circuit. */
 bool
 circuit_is_hs_v2(const circuit_t *circ)
 {
@@ -2022,7 +2022,7 @@ circuit_is_hs_v2(const circuit_t *circ)
           (CONST_TO_ORIGIN_CIRCUIT(circ)->rend_data != NULL));
 }
 
-/** Retrun true iff the given circuit is an HS v3 circuit. */
+/** Return true iff the given circuit is an HS v3 circuit. */
 bool
 circuit_is_hs_v3(const circuit_t *circ)
 {
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index f22c49d036..859ad1c6fc 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -19,7 +19,7 @@
  * TCP application socket that has arrived via (e.g.) a SOCKS request, or an
  * exit connection.
  *
- * Not every instance of edge_connection_t truly represents an edge connction,
+ * Not every instance of edge_connection_t truly represents an edge connection,
  * however. (Sorry!) We also create edge_connection_t objects for streams that
  * we will not be handling with TCP.  The types of these streams are:
  *   <ul>
@@ -578,8 +578,8 @@ connection_edge_end(edge_connection_t *conn, uint8_t reason)
 /**
  * Helper function for bsearch.
  *
- * As per smartlist_bsearch, return < 0 if key preceeds member,
- * > 0 if member preceeds key, and 0 if they are equal.
+ * As per smartlist_bsearch, return < 0 if key precedes member,
+ * > 0 if member precedes key, and 0 if they are equal.
  *
  * This is equivalent to subtraction of the values of key - member
  * (why does no one ever say that explicitly?).
@@ -2066,7 +2066,7 @@ connection_ap_handle_onion(entry_connection_t *conn,
       log_info(LD_GENERAL, "Found %s descriptor in cache for %s. %s.",
                (descriptor_is_usable) ? "usable" : "unusable",
                safe_str_client(onion_address),
-               (descriptor_is_usable) ? "Not fetching." : "Refecting.");
+               (descriptor_is_usable) ? "Not fetching." : "Refetching.");
     } else {
       rend_cache_lookup_result = -ENOENT;
     }
@@ -2655,8 +2655,8 @@ destination_from_socket(entry_connection_t *conn, socks_request_t *req)
       break;
 #endif /* defined(TRANS_NETFILTER_IPV6) */
     default:
-      log_warn(LD_BUG,
-               "Received transparent data from an unsuported socket family %d",
+      log_warn(LD_BUG, "Received transparent data from an unsupported "
+                       "socket family %d",
                ENTRY_TO_CONN(conn)->socket_family);
       return -1;
   }
diff --git a/src/core/or/lttng_circuit.inc b/src/core/or/lttng_circuit.inc
index fc3e175c8a..0ed29f8aaf 100644
--- a/src/core/or/lttng_circuit.inc
+++ b/src/core/or/lttng_circuit.inc
@@ -28,7 +28,7 @@
 /*
  * Circuit Purposes
  *
- * The following defines an enumeration of all possible circuit purpose so
+ * The following defines an enumeration of all possible circuit purposes so
  * they appear in the trace with the define name (first parameter of
  * ctf_enum_value) instead of the numerical value.
  */
@@ -70,7 +70,7 @@ TRACEPOINT_ENUM(tor_circuit, purpose,
 
     /* Misc. */
     ctf_enum_value("TESTING", CIRCUIT_PURPOSE_TESTING)
-    ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
+    ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
     ctf_enum_value("PATH_BIAS_TESTING", CIRCUIT_PURPOSE_PATH_BIAS_TESTING)
 
     /* VanGuard */
diff --git a/src/core/or/onion.h b/src/core/or/onion.h
index 600e67c3cd..0dac21ab6b 100644
--- a/src/core/or/onion.h
+++ b/src/core/or/onion.h
@@ -50,7 +50,7 @@ typedef struct extend_cell_t {
   tor_addr_port_t orport_ipv4;
   /** An IPv6 address and port for the node we're connecting to. */
   tor_addr_port_t orport_ipv6;
-  /** Identity fingerprint of the node we're conecting to.*/
+  /** Identity fingerprint of the node we're connecting to.*/
   uint8_t node_id[DIGEST_LEN];
   /** Ed25519 public identity key. Zero if not set. */
   struct ed25519_public_key_t ed_pubkey;
diff --git a/src/core/or/or_connection_st.h b/src/core/or/or_connection_st.h
index 253fe67020..d99aaaefad 100644
--- a/src/core/or/or_connection_st.h
+++ b/src/core/or/or_connection_st.h
@@ -31,7 +31,7 @@ struct or_connection_t {
   /** This is the ClientHash value we expect to receive from the
    *  client during the Extended ORPort authentication protocol. We
    *  compute it upon receiving the ClientNoce from the client, and we
-   *  compare it with the acual ClientHash value sent by the
+   *  compare it with the actual ClientHash value sent by the
    *  client. */
   char *ext_or_auth_correct_client_hash;
   /** String carrying the name of the pluggable transport
@@ -74,7 +74,7 @@ struct or_connection_t {
   unsigned int is_outgoing:1;
   unsigned int proxy_type:3; /**< One of PROXY_NONE...PROXY_HAPROXY */
   unsigned int wide_circ_ids:1;
-  /** True iff a failure on this connection indicates a posssible
+  /** True iff a failure on this connection indicates a possible
    * bootstrapping problem.  We set this as true if we notice that this
    * connection could handle a pending origin circuit, or if we launch it to
    * handle an origin circuit. */
diff --git a/src/core/or/origin_circuit_st.h b/src/core/or/origin_circuit_st.h
index 79e250cd59..a45a6573dc 100644
--- a/src/core/or/origin_circuit_st.h
+++ b/src/core/or/origin_circuit_st.h
@@ -54,7 +54,7 @@ enum path_state_t {
     /** Did any SOCKS streams or hidserv introductions actually succeed on
       * this circuit?
       *
-      * If any streams detatch/fail from this circuit, the code transitions
+      * If any streams detach/fail from this circuit, the code transitions
       * the circuit back to PATH_STATE_USE_ATTEMPTED to ensure we probe. See
       * pathbias_mark_use_rollback() for that.
       */
diff --git a/src/core/or/policies.c b/src/core/or/policies.c
index 24e9c0ce9f..5f578d9b1a 100644
--- a/src/core/or/policies.c
+++ b/src/core/or/policies.c
@@ -1849,7 +1849,7 @@ policies_log_first_redundant_entry(const smartlist_t *policy)
     int found_ipv4_wildcard = 0, found_ipv6_wildcard = 0;
     const int i = p_sl_idx;
 
-    /* Look for accept/reject *[4|6|]:* entires */
+    /* Look for accept/reject *[4|6|]:* entries */
     if (p->prt_min <= 1 && p->prt_max == 65535 && p->maskbits == 0) {
       family = tor_addr_family(&p->addr);
       /* accept/reject *:* may have already been expanded into
diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c
index 8ea9ef15d2..7b4595c1ac 100644
--- a/src/core/or/sendme.c
+++ b/src/core/or/sendme.c
@@ -678,7 +678,7 @@ sendme_record_received_cell_digest(circuit_t *circ, crypt_path_t *cpath)
     /* Record incoming digest. */
     cpath_sendme_record_cell_digest(cpath, false);
   } else {
-    /* Record foward digest. */
+    /* Record forward digest. */
     relay_crypto_record_sendme_digest(&TO_OR_CIRCUIT(circ)->crypto, true);
   }
 }
diff --git a/src/core/or/server_port_cfg_st.h b/src/core/or/server_port_cfg_st.h
index 9a005eccdf..69cdb29cbc 100644
--- a/src/core/or/server_port_cfg_st.h
+++ b/src/core/or/server_port_cfg_st.h
@@ -6,7 +6,7 @@
 
 /**
  * @file server_port_cfg_st.h
- * @brief Cnfiguration structure for server ports.
+ * @brief Configuration structure for server ports.
  **/
 
 #ifndef SERVER_PORT_CFG_ST_H
diff --git a/src/core/proto/proto_socks.c b/src/core/proto/proto_socks.c
index 08febee5bb..ada968c6b4 100644
--- a/src/core/proto/proto_socks.c
+++ b/src/core/proto/proto_socks.c
@@ -479,7 +479,7 @@ parse_socks5_userpass_auth(const uint8_t *raw_data, socks_request_t *req,
 /**
  * Validate and respond to SOCKS5 username/password request we
  * parsed in parse_socks5_userpass_auth (corresponding to <b>req</b>.
- * Set <b>req->reply</b> to appropriate responsed. Return
+ * Set <b>req->reply</b> to appropriate response. Return
  * SOCKS_RESULT_DONE on success or SOCKS_RESULT_INVALID on failure.
  */
 static socks_result_t
diff --git a/src/ext/curve25519_donna/README b/src/ext/curve25519_donna/README
index 9f77bd7d95..acab07cab9 100644
--- a/src/ext/curve25519_donna/README
+++ b/src/ext/curve25519_donna/README
@@ -6,7 +6,7 @@ If you run `make`, two .a archives will be built, similar to djb's curve25519
 code. Alternatively, read on:
 
 The C implementation is contained within curve25519-donna.c. It has no external
-dependancies and is BSD licenced. You can copy/include/link it directly in with
+dependencies and is BSD licenced. You can copy/include/link it directly in with
 your program. Recommended C flags: -O2
 
 The x86-64 bit implementation is contained within curve25519-donna-x86-64.c and
diff --git a/src/ext/ed25519/donna/README.md b/src/ext/ed25519/donna/README.md
index e09fc27e31..aa77651bf4 100644
--- a/src/ext/ed25519/donna/README.md
+++ b/src/ext/ed25519/donna/README.md
@@ -1,5 +1,5 @@
 [ed25519](http://ed25519.cr.yp.to/) is an 
-[Elliptic Curve Digital Signature Algortithm](http://en.wikipedia.org/wiki/Elliptic_Curve_DSA), 
+[Elliptic Curve Digital Signature Algorithm](http://en.wikipedia.org/wiki/Elliptic_Curve_DSA), 
 developed by [Dan Bernstein](http://cr.yp.to/djb.html), 
 [Niels Duif](http://www.nielsduif.nl/), 
 [Tanja Lange](http://hyperelliptic.org/tanja), 
@@ -56,7 +56,7 @@ No configuration is needed **if you are compiling against OpenSSL**.
 
 ##### Hash Options
 
-If you are not compiling aginst OpenSSL, you will need a hash function.
+If you are not compiling against OpenSSL, you will need a hash function.
 
 To use a simple/**slow** implementation of SHA-512, use `-DED25519_REFHASH` when compiling `ed25519.c`. 
 This should never be used except to verify the code works when OpenSSL is not available.
@@ -73,7 +73,7 @@ custom hash implementation in ed25519-hash-custom.h. The hash must have a 512bit
 
 ##### Random Options
 
-If you are not compiling aginst OpenSSL, you will need a random function for batch verification.
+If you are not compiling against OpenSSL, you will need a random function for batch verification.
 
 To use a custom random function, use `-DED25519_CUSTOMRANDOM` when compiling `ed25519.c` and put your 
 custom hash implementation in ed25519-randombytes-custom.h. The random function must implement:
@@ -170,7 +170,7 @@ signing due to both using the same code for the scalar multiply.
 
 #### Testing
 
-Fuzzing against reference implemenations is now available. See [fuzz/README](fuzz/README.md).
+Fuzzing against reference implementations is now available. See [fuzz/README](fuzz/README.md).
 
 Building `ed25519.c` with `-DED25519_TEST` and linking with `test.c` will run basic sanity tests
 and benchmark each function. `test-batch.c` has been incorporated in to `test.c`.
@@ -180,4 +180,4 @@ with extreme values to ensure they function correctly. SSE2 is now supported.
 
 #### Papers
 
-[Available on the Ed25519 website](http://ed25519.cr.yp.to/papers.html)
\ No newline at end of file
+[Available on the Ed25519 website](http://ed25519.cr.yp.to/papers.html)
diff --git a/src/ext/ed25519/donna/fuzz/build-nix.php b/src/ext/ed25519/donna/fuzz/build-nix.php
index c69144ebc9..7f068922d6 100644
--- a/src/ext/ed25519/donna/fuzz/build-nix.php
+++ b/src/ext/ed25519/donna/fuzz/build-nix.php
@@ -6,7 +6,7 @@
 
 	function usage($reason) {
 		echoln("Usage: php build-nix.php [flags]");
-		echoln("Flags in parantheses are optional");
+		echoln("Flags in parentheses are optional");
 		echoln("");
 		echoln("  --bits=[32,64]");
 		echoln("  --function=[curve25519,ed25519]");
diff --git a/src/ext/ed25519/donna/test-internals.c b/src/ext/ed25519/donna/test-internals.c
index fe9db9d669..8afe89d5ed 100644
--- a/src/ext/ed25519/donna/test-internals.c
+++ b/src/ext/ed25519/donna/test-internals.c
@@ -1,4 +1,4 @@
-/* Tor: Removed, file is inclued in ed25519.c instead. */
+/* Tor: Removed, file is included in ed25519.c instead. */
 /* #include <stdio.h> */
 /* #include "ed25519-donna.h" */
 
diff --git a/src/feature/client/addressmap.c b/src/feature/client/addressmap.c
index 9ad2d7f934..e5bf2cc49c 100644
--- a/src/feature/client/addressmap.c
+++ b/src/feature/client/addressmap.c
@@ -422,7 +422,7 @@ addressmap_rewrite(char *address, size_t maxlen,
       goto done;
     }
 
-    /* Check wither the flags we were passed tell us not to use this
+    /* Check whether the flags we were passed tell us not to use this
      * mapping. */
     switch (ent->source) {
       case ADDRMAPSRC_DNS:
@@ -515,7 +515,7 @@ addressmap_rewrite_reverse(char *address, size_t maxlen, unsigned flags,
     else if (f == AF_INET6 && !(flags & AMR_FLAG_USE_IPV6_DNS))
       return 0;
     /* FFFF we should reverse-map virtual addresses even if we haven't
-     * enabled DNS cacheing. */
+     * enabled DNS caching. */
   }
 
   tor_asprintf(&s, "REVERSE[%s]", address);
diff --git a/src/feature/client/bridges.c b/src/feature/client/bridges.c
index 59f79219cf..6e10defa13 100644
--- a/src/feature/client/bridges.c
+++ b/src/feature/client/bridges.c
@@ -934,7 +934,7 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
       if (!from_cache) {
         /* This schedules the re-fetch at a constant interval, which produces
          * a pattern of bridge traffic. But it's better than trying all
-         * configured briges several times in the first few minutes. */
+         * configured bridges several times in the first few minutes. */
         download_status_reset(&bridge->fetch_status);
       }
 
diff --git a/src/feature/client/circpathbias.c b/src/feature/client/circpathbias.c
index 74260171fe..4d27553926 100644
--- a/src/feature/client/circpathbias.c
+++ b/src/feature/client/circpathbias.c
@@ -683,7 +683,7 @@ pathbias_mark_use_success(origin_circuit_t *circ)
 }
 
 /**
- * If a stream ever detatches from a circuit in a retriable way,
+ * If a stream ever detaches from a circuit in a retriable way,
  * we need to mark this circuit as still needing either another
  * successful stream, or in need of a probe.
  *
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c
index 2104a622da..cc77cbcbf5 100644
--- a/src/feature/client/entrynodes.c
+++ b/src/feature/client/entrynodes.c
@@ -342,7 +342,7 @@ entry_guard_get_pathbias_state(entry_guard_t *guard)
 
 HANDLE_IMPL(entry_guard, entry_guard_t, ATTR_UNUSED STATIC)
 
-/** Return an interval betweeen 'now' and 'max_backdate' seconds in the past,
+/** Return an interval between 'now' and 'max_backdate' seconds in the past,
  * chosen uniformly at random.  We use this before recording persistent
  * dates, so that we aren't leaking exactly when we recorded it.
  */
@@ -3359,7 +3359,7 @@ get_guard_state_for_bridge_desc_fetch(const char *digest)
   }
 
   /* Update the guard last_tried_to_connect time since it's checked by the
-   * guard susbsystem. */
+   * guard subsystem. */
   guard->last_tried_to_connect = approx_time();
 
   /* Create the guard state */
diff --git a/src/feature/client/transports.c b/src/feature/client/transports.c
index 0e4361a210..d1c807189a 100644
--- a/src/feature/client/transports.c
+++ b/src/feature/client/transports.c
@@ -16,7 +16,7 @@
  * managed proxies that are still unconfigured.
  *
  * In every run_scheduled_event() tick, we attempt to launch and then
- * configure the unconfiged managed proxies, using the configuration
+ * configure the unconfigured managed proxies, using the configuration
  * protocol defined in the 180_pluggable_transport.txt proposal. A
  * managed proxy might need several ticks to get fully configured.
  *
@@ -71,7 +71,7 @@
  *
  * We then start parsing torrc again.
  *
- * Everytime we encounter a transport line using a managed proxy that
+ * Every time we encounter a transport line using a managed proxy that
  * was around before the config read, we cleanse that proxy from the
  * removal mark.  We also toggle the <b>check_if_restarts_needed</b>
  * flag, so that on the next <b>pt_configure_remaining_proxies</b>
diff --git a/src/feature/control/control.c b/src/feature/control/control.c
index ef707319a6..2aebe1aac6 100644
--- a/src/feature/control/control.c
+++ b/src/feature/control/control.c
@@ -280,7 +280,7 @@ is_valid_initial_command(control_connection_t *conn, const char *cmd)
 #define MAX_COMMAND_LINE_LENGTH (1024*1024)
 
 /** Wrapper around peek_buf_has_control0 command: presents the same
- * interface as that underlying functions, but takes a connection_t intead of
+ * interface as that underlying functions, but takes a connection_t instead of
  * a buf_t.
  */
 static int
diff --git a/src/feature/control/getinfo_geoip.c b/src/feature/control/getinfo_geoip.c
index 33019207e6..542f3e97f7 100644
--- a/src/feature/control/getinfo_geoip.c
+++ b/src/feature/control/getinfo_geoip.c
@@ -5,7 +5,7 @@
 
 /**
  * @file getinfo_geoip.c
- * @brief GEOIP-related contoller GETINFO commands.
+ * @brief GEOIP-related controller GETINFO commands.
  **/
 
 #include "core/or/or.h"
diff --git a/src/feature/dirauth/dirauth_options.inc b/src/feature/dirauth/dirauth_options.inc
index 40a42b9092..05726b8c2f 100644
--- a/src/feature/dirauth/dirauth_options.inc
+++ b/src/feature/dirauth/dirauth_options.inc
@@ -47,7 +47,7 @@ CONF_VAR(AuthDirTestEd25519LinkKeys, BOOL, 0, "1")
 /**
  * Bool (default 1): As an authority, should we launch tests for
  * reachability, and use those results to vote on "Running"?  If 0,
- * we assume that every relay is Runnning.
+ * we assume that every relay is Running.
  **/
 CONF_VAR(AuthDirTestReachability, BOOL, 0, "1")
 
diff --git a/src/feature/dirauth/keypin.c b/src/feature/dirauth/keypin.c
index 5072a58573..21afff550a 100644
--- a/src/feature/dirauth/keypin.c
+++ b/src/feature/dirauth/keypin.c
@@ -70,7 +70,7 @@
  *
  * We persist these entries to disk using a simple format, where each line
  * has a base64-encoded RSA SHA1 hash, then a base64-endoded Ed25519 key.
- * Empty lines, misformed lines, and lines beginning with # are
+ * Empty lines, malformed lines, and lines beginning with # are
  * ignored. Lines beginning with @ are reserved for future extensions.
  *
  * The dirserv.c module is the main user of these functions.
@@ -507,7 +507,7 @@ keypin_clear(void)
   HT_CLEAR(rsamap,&the_rsa_map);
 
   if (bad_entries) {
-    log_warn(LD_BUG, "Found %d discrepencies in the keypin database.",
+    log_warn(LD_BUG, "Found %d discrepancies in the keypin database.",
              bad_entries);
   }
 }
diff --git a/src/feature/dirauth/shared_random.c b/src/feature/dirauth/shared_random.c
index fd55008242..e7c13787c4 100644
--- a/src/feature/dirauth/shared_random.c
+++ b/src/feature/dirauth/shared_random.c
@@ -52,7 +52,7 @@
  *   saves the current state of the protocol on disk so that it can resume
  *   normally in case of reboot. The disk state (sr_disk_state_t) is managed by
  *   shared_random_state.c:state_query() and we go to extra lengths to ensure
- *   that the state is flushed on disk everytime we receive any useful
+ *   that the state is flushed on disk every time we receive any useful
  *   information like commits or SRVs.
  *
  * - When we receive a commit from a vote, we examine it to see if it's useful
@@ -62,7 +62,7 @@
  *   receive the reveal information corresponding to a commitment, we verify
  *   that they indeed match using verify_commit_and_reveal().
  *
- * - We treat consensuses as the ground truth, so everytime we generate a new
+ * - We treat consensuses as the ground truth, so every time we generate a new
  *   consensus we update our SR state accordingly even if our local view was
  *   different (see sr_act_post_consensus()).
  *
@@ -170,7 +170,7 @@ commit_log(const sr_commit_t *commit)
 
 /** Make sure that the commitment and reveal information in <b>commit</b>
  * match. If they match return 0, return -1 otherwise. This function MUST be
- * used everytime we receive a new reveal value. Furthermore, the commit
+ * used every time we receive a new reveal value. Furthermore, the commit
  * object MUST have a reveal value and the hash of the reveal value. */
 STATIC int
 verify_commit_and_reveal(const sr_commit_t *commit)
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index 07bc757506..c555202942 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -780,7 +780,7 @@ new_protocol_run(time_t valid_after)
     sr_compute_srv();
   }
 
-  /* Prepare for the new protocol run by reseting the state */
+  /* Prepare for the new protocol run by resetting the state */
   reset_state_for_new_protocol_run(valid_after);
 
   /* Do some logging */
diff --git a/src/feature/dirauth/vote_microdesc_hash_st.h b/src/feature/dirauth/vote_microdesc_hash_st.h
index 7f8ebf7fd7..6870bbab2c 100644
--- a/src/feature/dirauth/vote_microdesc_hash_st.h
+++ b/src/feature/dirauth/vote_microdesc_hash_st.h
@@ -6,7 +6,7 @@
 
 /**
  * @file vote_microdesc_hash_st.h
- * @brief Microdescriptor-hash voting strcture.
+ * @brief Microdescriptor-hash voting structure.
  **/
 
 #ifndef VOTE_MICRODESC_HASH_ST_H
diff --git a/src/feature/dirauth/voting_schedule.h b/src/feature/dirauth/voting_schedule.h
index 9e2ac29c75..271bdcda33 100644
--- a/src/feature/dirauth/voting_schedule.h
+++ b/src/feature/dirauth/voting_schedule.h
@@ -45,7 +45,7 @@ typedef struct {
   /* True iff this voting schedule was set on demand meaning not through the
    * normal vote operation of a dirauth or when a consensus is set. This only
    * applies to a directory authority that needs to recalculate the voting
-   * timings only for the first vote even though this object was initilized
+   * timings only for the first vote even though this object was initialized
    * prior to voting. */
   int created_on_demand;
 
diff --git a/src/feature/dircache/dircache.c b/src/feature/dircache/dircache.c
index efcae41084..207ea6698b 100644
--- a/src/feature/dircache/dircache.c
+++ b/src/feature/dircache/dircache.c
@@ -735,7 +735,7 @@ digest_list_contains_best_consensus(consensus_flavor_t flavor,
 typedef struct {
   /** name of the flavor to retrieve. */
   char *flavor;
-  /** flavor to retrive, as enum. */
+  /** flavor to retrieve, as enum. */
   consensus_flavor_t flav;
   /** plus-separated list of authority fingerprints; see
    * client_likes_consensus(). Aliases the URL in the request passed to
diff --git a/src/feature/dircommon/consdiff.c b/src/feature/dircommon/consdiff.c
index e42378c44c..988d7f71ab 100644
--- a/src/feature/dircommon/consdiff.c
+++ b/src/feature/dircommon/consdiff.c
@@ -829,7 +829,7 @@ gen_ed_diff(const smartlist_t *cons1_orig, const smartlist_t *cons2,
 }
 
 /* Helper: Read a base-10 number between 0 and INT32_MAX from <b>s</b> and
- * store it in <b>num_out</b>.  Advance <b>s</b> to the characer immediately
+ * store it in <b>num_out</b>.  Advance <b>s</b> to the character immediately
  * after the number.  Return 0 on success, -1 on failure. */
 static int
 get_linenum(const char **s, int *num_out)
@@ -1335,7 +1335,7 @@ consensus_join_lines(const smartlist_t *inp)
 }
 
 /** Given two consensus documents, try to compute a diff between them.  On
- * success, retun a newly allocated string containing that diff.  On failure,
+ * success, return a newly allocated string containing that diff.  On failure,
  * return NULL. */
 char *
 consensus_diff_generate(const char *cons1, size_t cons1len,
diff --git a/src/feature/dirparse/ns_parse.c b/src/feature/dirparse/ns_parse.c
index d24b0cb18d..138d248b08 100644
--- a/src/feature/dirparse/ns_parse.c
+++ b/src/feature/dirparse/ns_parse.c
@@ -247,7 +247,7 @@ routerstatus_parse_guardfraction(const char *guardfraction_str,
 
   tor_assert(bool_eq(vote, vote_rs));
 
-  /* If this info comes from a consensus, but we should't apply
+  /* If this info comes from a consensus, but we shouldn't apply
      guardfraction, just exit. */
   if (is_consensus && !should_apply_guardfraction(NULL)) {
     return 0;
diff --git a/src/feature/dirparse/routerparse.c b/src/feature/dirparse/routerparse.c
index 687d699dfb..635fc4b49d 100644
--- a/src/feature/dirparse/routerparse.c
+++ b/src/feature/dirparse/routerparse.c
@@ -653,17 +653,18 @@ router_parse_entry_from_string(const char *s, const char *end,
         goto err;
       }
       if (strcmp(ed_cert_tok->object_type, "ED25519 CERT")) {
-        log_warn(LD_DIR, "Wrong object type on identity-ed25519 in decriptor");
+        log_warn(LD_DIR, "Wrong object type on identity-ed25519 "
+                         "in descriptor");
         goto err;
       }
       if (strcmp(cc_ntor_tok->object_type, "ED25519 CERT")) {
         log_warn(LD_DIR, "Wrong object type on ntor-onion-key-crosscert "
-                 "in decriptor");
+                 "in descriptor");
         goto err;
       }
       if (strcmp(cc_tap_tok->object_type, "CROSSCERT")) {
         log_warn(LD_DIR, "Wrong object type on onion-key-crosscert "
-                 "in decriptor");
+                 "in descriptor");
         goto err;
       }
       if (strcmp(cc_ntor_tok->args[0], "0") &&
@@ -1065,7 +1066,8 @@ extrainfo_parse_entry_from_string(const char *s, const char *end,
         goto err;
       }
       if (strcmp(ed_cert_tok->object_type, "ED25519 CERT")) {
-        log_warn(LD_DIR, "Wrong object type on identity-ed25519 in decriptor");
+        log_warn(LD_DIR, "Wrong object type on identity-ed25519 "
+                         "in descriptor");
         goto err;
       }
 
diff --git a/src/feature/hibernate/hibernate.h b/src/feature/hibernate/hibernate.h
index 2383658b20..48a03e8239 100644
--- a/src/feature/hibernate/hibernate.h
+++ b/src/feature/hibernate/hibernate.h
@@ -48,7 +48,7 @@ typedef enum {
   /** We are hibernating, and we won't wake up till there's more bandwidth to
    * use. */
   HIBERNATE_STATE_DORMANT=4,
-  /** We start out in state default, which means we havent decided which state
+  /** We start out in state default, which means we haven't decided which state
    * we're in. */
   HIBERNATE_STATE_INITIAL=5
 } hibernate_state_t;
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c
index 44cd2505fd..03e004c356 100644
--- a/src/feature/hs/hs_cache.c
+++ b/src/feature/hs/hs_cache.c
@@ -854,7 +854,7 @@ hs_cache_lookup_as_client(const ed25519_public_key_t *key)
  *                                  was not usable but the descriptor was
  *                                  still stored.
  *
- *  Any other codes means indicate where the error occured and the descriptor
+ *  Any other codes means indicate where the error occurred and the descriptor
  *  was not stored. */
 hs_desc_decode_status_t
 hs_cache_store_as_client(const char *desc_str,
@@ -1019,7 +1019,7 @@ hs_cache_client_intro_state_purge(void)
 }
 
 /* This is called when new client authorization was added to the global state.
- * It attemps to decode the descriptor of the given service identity key.
+ * It attempts to decode the descriptor of the given service identity key.
  *
  * Return true if decoding was successful else false. */
 bool
diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c
index fc9f4a2654..8bdaa4922a 100644
--- a/src/feature/hs/hs_cell.c
+++ b/src/feature/hs/hs_cell.c
@@ -56,7 +56,7 @@ compute_introduce_mac(const uint8_t *encoded_cell, size_t encoded_cell_len,
   /* First, put the encoded cell in the msg. */
   memcpy(mac_msg, encoded_cell, encoded_cell_len);
   offset += encoded_cell_len;
-  /* Second, put the CLIENT_PK + ENCRYPTED_DATA but ommit the MAC field (which
+  /* Second, put the CLIENT_PK + ENCRYPTED_DATA but omit the MAC field (which
    * is junk at this point). */
   memcpy(mac_msg + offset, encrypted, (encrypted_len - DIGEST256_LEN));
   offset += (encrypted_len - DIGEST256_LEN);
@@ -293,7 +293,7 @@ introduce1_set_encrypted_link_spec(trn_cell_introduce_encrypted_t *cell,
 }
 
 /** Set padding in the enc_cell only if needed that is the total length of both
- * sections are below the mininum required for an INTRODUCE1 cell. */
+ * sections are below the minimum required for an INTRODUCE1 cell. */
 static void
 introduce1_set_encrypted_padding(const trn_cell_introduce1_t *cell,
                                  trn_cell_introduce_encrypted_t *enc_cell)
diff --git a/src/feature/hs/hs_cell.h b/src/feature/hs/hs_cell.h
index 2b28c44c50..5889e7c6dd 100644
--- a/src/feature/hs/hs_cell.h
+++ b/src/feature/hs/hs_cell.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_cell.h
- * \brief Header file containing cell data for the whole HS subsytem.
+ * \brief Header file containing cell data for the whole HS subsystem.
  **/
 
 #ifndef TOR_HS_CELL_H
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index e4422c86a8..eaf99cf8b2 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -817,7 +817,7 @@ hs_circ_service_intro_has_opened(hs_service_t *service,
   tor_assert(desc);
   tor_assert(circ);
 
-  /* Cound opened circuits that have sent ESTABLISH_INTRO cells or are already
+  /* Count opened circuits that have sent ESTABLISH_INTRO cells or are already
    * established introduction circuits */
   num_intro_circ = count_opened_desc_intro_point_circuits(service, desc);
   num_needed_circ = service->config.num_intro_points;
diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h
index 22e936e685..4dd9bf94c5 100644
--- a/src/feature/hs/hs_circuit.h
+++ b/src/feature/hs/hs_circuit.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_circuit.h
- * \brief Header file containing circuit data for the whole HS subsytem.
+ * \brief Header file containing circuit data for the whole HS subsystem.
  **/
 
 #ifndef TOR_HS_CIRCUIT_H
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index b67ff237b5..7cec2e0dce 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -329,7 +329,7 @@ retry_all_socks_conn_waiting_for_desc(void)
        * a descriptor but we do have it in the cache.
        *
        * This can happen is tor comes back from suspend where it previously
-       * had the descriptor but the intro points were not usuable. Once it
+       * had the descriptor but the intro points were not usable. Once it
        * came back to life, the intro point failure cache was cleaned up and
        * thus the descriptor became usable again leaving us in this code path.
        *
@@ -1756,7 +1756,7 @@ remove_client_auth_creds_file(const char *filename)
     goto end;
   }
 
-  log_warn(LD_REND, "Successfuly removed client auth file (%s).",
+  log_warn(LD_REND, "Successfully removed client auth file (%s).",
            creds_file_path);
 
  end:
diff --git a/src/feature/hs/hs_client.h b/src/feature/hs/hs_client.h
index 88dede8126..411fa659f2 100644
--- a/src/feature/hs/hs_client.h
+++ b/src/feature/hs/hs_client.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_client.h
- * \brief Header file containing client data for the HS subsytem.
+ * \brief Header file containing client data for the HS subsystem.
  **/
 
 #ifndef TOR_HS_CLIENT_H
@@ -35,12 +35,12 @@ typedef enum {
 
 /* Status code of client auth credential registration */
 typedef enum {
-  /* We successfuly registered these credentials */
+  /* We successfully registered these credentials */
   REGISTER_SUCCESS,
   /* We successfully registered these credentials, but had to replace some
    * existing ones. */
   REGISTER_SUCCESS_ALREADY_EXISTS,
-  /* We successfuly registered these credentials, and also decrypted a cached
+  /* We successfully registered these credentials, and also decrypted a cached
    * descriptor. */
   REGISTER_SUCCESS_AND_DECRYPTED,
   /* We failed to register these credentials, because of a bad HS address. */
@@ -51,7 +51,7 @@ typedef enum {
 
 /* Status code of client auth credential removal */
 typedef enum {
-  /* We successfuly removed these credentials */
+  /* We successfully removed these credentials */
   REMOVAL_SUCCESS,
   /* No need to remove those credentials, because they were not there. */
   REMOVAL_SUCCESS_NOT_FOUND,
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index 24d34144e4..8f3a5dfdf8 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1814,7 +1814,7 @@ hs_get_extend_info_from_lspecs(const smartlist_t *lspecs,
 
 /***********************************************************************/
 
-/** Initialize the entire HS subsytem. This is called in tor_init() before any
+/** Initialize the entire HS subsystem. This is called in tor_init() before any
  * torrc options are loaded. Only for >= v3. */
 void
 hs_init(void)
diff --git a/src/feature/hs/hs_common.h b/src/feature/hs/hs_common.h
index 997b7298a6..4a9c7a9918 100644
--- a/src/feature/hs/hs_common.h
+++ b/src/feature/hs/hs_common.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_common.h
- * \brief Header file containing common data for the whole HS subsytem.
+ * \brief Header file containing common data for the whole HS subsystem.
  **/
 
 #ifndef TOR_HS_COMMON_H
diff --git a/src/feature/hs/hs_config.c b/src/feature/hs/hs_config.c
index 0dad8dd6d8..7ffc7ecb96 100644
--- a/src/feature/hs/hs_config.c
+++ b/src/feature/hs/hs_config.c
@@ -16,7 +16,7 @@
  * options and then put in a staging list. It will stay there until
  * hs_service_load_all_keys() is called. That function is responsible to
  * load/generate the keys for the service in the staging list and if
- * successful, transfert the service to the main global service list where
+ * successful, transferred the service to the main global service list where
  * at that point it is ready to be used.
  *
  * Configuration functions are per-version and there is a main generic one for
@@ -362,7 +362,7 @@ config_validate_service(const hs_service_config_t *config)
   return -1;
 }
 
-/** Configuration funcion for a version 3 service. The given service
+/** Configuration function for a version 3 service. The given service
  * object must be already allocated and passed through
  * config_generic_service() prior to calling this function.
  *
diff --git a/src/feature/hs/hs_config.h b/src/feature/hs/hs_config.h
index c60b4fbb5d..48c24b1a08 100644
--- a/src/feature/hs/hs_config.h
+++ b/src/feature/hs/hs_config.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_config.h
- * \brief Header file containing configuration ABI/API for the HS subsytem.
+ * \brief Header file containing configuration ABI/API for the HS subsystem.
  **/
 
 #ifndef TOR_HS_CONFIG_H
diff --git a/src/feature/hs/hs_descriptor.c b/src/feature/hs/hs_descriptor.c
index 30a36030d1..0656224e48 100644
--- a/src/feature/hs/hs_descriptor.c
+++ b/src/feature/hs/hs_descriptor.c
@@ -186,7 +186,7 @@ build_mac(const uint8_t *mac_key, size_t mac_key_len,
   crypto_digest_free(digest);
 }
 
-/** Using a secret data and a given decriptor object, build the secret
+/** Using a secret data and a given descriptor object, build the secret
  * input needed for the KDF.
  *
  * secret_input = SECRET_DATA | subcredential | INT_8(revision_counter)
@@ -1407,7 +1407,7 @@ build_descriptor_cookie_keys(const hs_subcredential_t *subcredential,
 }
 
 /** Decrypt the descriptor cookie given the descriptor, the auth client,
- * and the client secret key. On sucess, return 0 and a newly allocated
+ * and the client secret key. On success, return 0 and a newly allocated
  * descriptor cookie descriptor_cookie_out. On error or if the client id
  * is invalid, return -1 and descriptor_cookie_out is set to
  * NULL. */
@@ -1433,7 +1433,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
   tor_assert(!fast_mem_is_zero((char *) desc->subcredential.subcred,
                                DIGEST256_LEN));
 
-  /* Catch potential code-flow cases of an unitialized private key sneaking
+  /* Catch potential code-flow cases of an uninitialized private key sneaking
    * into this function. */
   if (BUG(fast_mem_is_zero((char *)client_auth_sk, sizeof(*client_auth_sk)))) {
     goto done;
@@ -1448,7 +1448,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
   tor_assert(keystream_length > 0);
 
   /* If the client id of auth client is not the same as the calculcated
-   * client id, it means that this auth client is invaild according to the
+   * client id, it means that this auth client is invalid according to the
    * client secret key client_auth_sk. */
   if (tor_memneq(client->client_id, keystream, HS_DESC_CLIENT_ID_LEN)) {
     goto done;
@@ -1481,7 +1481,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
  *  the descriptor object <b>desc</b> and <b>descriptor_cookie</b>
  *  to generate the right decryption keys; set <b>decrypted_out</b> to
  *  the plaintext. If <b>is_superencrypted_layer</b> is set, this is
- *  the outter encrypted layer of the descriptor.
+ *  the outer encrypted layer of the descriptor.
  *
  * On any error case, including an empty output, return 0 and set
  * *<b>decrypted_out</b> to NULL.
@@ -2003,7 +2003,7 @@ desc_sig_is_valid(const char *b64_sig,
   /* Signature length check. */
   if (strlen(b64_sig) != ED25519_SIG_BASE64_LEN) {
     log_warn(LD_REND, "Service descriptor has an invalid signature length."
-                      "Exptected %d but got %lu",
+                      "Expected %d but got %lu",
              ED25519_SIG_BASE64_LEN, (unsigned long) strlen(b64_sig));
     goto err;
   }
diff --git a/src/feature/hs/hs_ident.c b/src/feature/hs/hs_ident.c
index 1d93ff9610..53360f6e9d 100644
--- a/src/feature/hs/hs_ident.c
+++ b/src/feature/hs/hs_ident.c
@@ -4,7 +4,7 @@
 /**
  * \file hs_ident.c
  * \brief Contains circuit and connection identifier code for the whole HS
- *        subsytem.
+ *        subsystem.
  **/
 
 #include "lib/crypt_ops/crypto_util.h"
diff --git a/src/feature/hs/hs_ident.h b/src/feature/hs/hs_ident.h
index f4b9b2432d..0a71602852 100644
--- a/src/feature/hs/hs_ident.h
+++ b/src/feature/hs/hs_ident.h
@@ -4,7 +4,7 @@
 /**
  * \file hs_ident.h
  * \brief Header file containing circuit and connection identifier data for
- *        the whole HS subsytem.
+ *        the whole HS subsystem.
  *
  * \details
  * This interface is used to uniquely identify a hidden service on a circuit
diff --git a/src/feature/hs/hs_ob.c b/src/feature/hs/hs_ob.c
index 9499c28d20..1b8ab121a0 100644
--- a/src/feature/hs/hs_ob.c
+++ b/src/feature/hs/hs_ob.c
@@ -120,7 +120,7 @@ get_onion_public_key(const char *value, ed25519_public_key_t *pkey_out)
   }
 
   /* We don't want the .onion so we add 2 because size - 1 is copied with
-   * strlcpy() in order to accomodate the NUL byte and sizeof() counts the NUL
+   * strlcpy() in order to accommodate the NUL byte and sizeof() counts the NUL
    * byte so we need to remove them from the equation. */
   strlcpy(address, value, strlen(value) - sizeof(".onion") + 2);
 
@@ -264,10 +264,10 @@ hs_ob_parse_config_file(hs_service_config_t *config)
 
 /** Compute all possible subcredentials for every onion master key in the given
  * service config object. subcredentials_out is allocated and set as an
- * continous array containing all possible values.
+ * continuous array containing all possible values.
  *
  * On success, return the number of subcredential put in the array which will
- * correspond to an arry of size: n * DIGEST256_LEN where DIGEST256_LEN is the
+ * correspond to an array of size: n * DIGEST256_LEN where DIGEST256_LEN is the
  * length of a single subcredential.
  *
  * If the given configuration object has no OB master keys configured, 0 is
@@ -300,7 +300,7 @@ compute_subcredentials(const hs_service_t *service,
   /* Time to build all the subcredentials for each time period: two for each
    * instance descriptor plus three for the onionbalance frontend service: the
    * previous one (-1), the current one (0) and the next one (1) for each
-   * configured key in order to accomodate client and service consensus skew.
+   * configured key in order to accommodate client and service consensus skew.
    *
    * If the client consensus after_time is at 23:00 but the service one is at
    * 01:00, the client will be using the previous time period where the
@@ -356,9 +356,10 @@ compute_subcredentials(const hs_service_t *service,
  *  If we are not an Onionbalance instance or we are not ready to do so, this
  *  is a NOP.
  *
- *  This function is called everytime we build a new descriptor. That's because
- *  we want our Onionbalance keys to always use up-to-date subcredentials both
- *  for the instance (ourselves) and for the onionbalance frontend.
+ *  This function is called every time we build a new descriptor. That's
+ *  because we want our Onionbalance keys to always use up-to-date
+ *  subcredentials both for the instance (ourselves) and for the onionbalance
+ *  frontend.
  */
 void
 hs_ob_refresh_keys(hs_service_t *service)
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 3d0e5dc1db..fee999cac5 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -546,7 +546,7 @@ service_intro_point_remove(const hs_service_t *service,
   /* Trying all descriptors. */
   FOR_EACH_DESCRIPTOR_BEGIN(service, desc) {
     /* We'll try to remove the descriptor on both descriptors which is not
-     * very expensive to do instead of doing loopup + remove. */
+     * very expensive to do instead of doing lookup + remove. */
     digest256map_remove(desc->intro_points.map,
                         ip->auth_key_kp.pubkey.pubkey);
   } FOR_EACH_DESCRIPTOR_END;
@@ -567,7 +567,7 @@ service_intro_point_find(const hs_service_t *service,
    *
    * Even if we use the same node as intro point in both descriptors, the node
    * will have a different intro auth key for each descriptor since we generate
-   * a new one everytime we pick an intro point.
+   * a new one every time we pick an intro point.
    *
    * After #22893 gets implemented, intro points will be moved to be
    * per-service instead of per-descriptor so this function will need to
@@ -784,7 +784,7 @@ close_service_rp_circuits(hs_service_t *service)
         ed25519_pubkey_eq(&ocirc->hs_ident->identity_pk,
                           &service->keys.identity_pk)) {
       /* Reason is FINISHED because service has been removed and thus the
-       * circuit is considered old/uneeded. When freed, it is removed from the
+       * circuit is considered old/unneeded. When freed, it is removed from the
        * hs circuitmap. */
       circuit_mark_for_close(TO_CIRCUIT(ocirc), END_CIRC_REASON_FINISHED);
     }
@@ -802,7 +802,7 @@ close_intro_circuits(hs_service_intropoints_t *intro_points)
     origin_circuit_t *ocirc = hs_circ_service_get_intro_circ(ip);
     if (ocirc) {
       /* Reason is FINISHED because service has been removed and thus the
-       * circuit is considered old/uneeded. When freed, the circuit is removed
+       * circuit is considered old/unneeded. When freed, the circuit is removed
        * from the HS circuitmap. */
       circuit_mark_for_close(TO_CIRCUIT(ocirc), END_CIRC_REASON_FINISHED);
     }
@@ -1086,7 +1086,7 @@ load_service_keys(hs_service_t *service)
     goto end;
   }
 
-  /* Succes. */
+  /* Success. */
   ret = 0;
  end:
   tor_free(fname);
@@ -2194,7 +2194,7 @@ pick_needed_intro_points(hs_service_t *service,
   }
 
   /* Build an exclude list of nodes of our intro point(s). The expiring intro
-   * points are OK to pick again because this is afterall a concept of round
+   * points are OK to pick again because this is after all a concept of round
    * robin so they are considered valid nodes to pick again. */
   DIGEST256MAP_FOREACH(desc->intro_points.map, key,
                        hs_service_intro_point_t *, ip) {
@@ -2378,7 +2378,7 @@ should_remove_intro_point(hs_service_intro_point_t *ip, time_t now)
 
   tor_assert(ip);
 
-  /* Any one of the following needs to be True to furfill the criteria to
+  /* Any one of the following needs to be True to fulfill the criteria to
    * remove an intro point. */
   bool has_no_retries = (ip->circuit_retries >
                          MAX_INTRO_POINT_CIRCUIT_RETRIES);
@@ -2997,7 +2997,7 @@ upload_descriptor_to_all(const hs_service_t *service,
   /* Get our list of responsible HSDir. */
   responsible_dirs = smartlist_new();
   /* The parameter 0 means that we aren't a client so tell the function to use
-   * the spread store consensus paremeter. */
+   * the spread store consensus parameter. */
   hs_get_responsible_hsdirs(&desc->blinded_kp.pubkey, desc->time_period_num,
                             service->desc_next == desc, 0, responsible_dirs);
 
@@ -3231,7 +3231,7 @@ refresh_service_descriptor(const hs_service_t *service,
                            hs_service_descriptor_t *desc, time_t now)
 {
   /* There are few fields that we consider "mutable" in the descriptor meaning
-   * we need to update them regurlarly over the lifetime fo the descriptor.
+   * we need to update them regularly over the lifetime for the descriptor.
    * The rest are set once and should not be modified.
    *
    *  - Signing key certificate.
@@ -3529,7 +3529,7 @@ service_add_fnames_to_list(const hs_service_t *service, smartlist_t *list)
   s_dir = service->config.directory_path;
   /* The hostname file. */
   smartlist_add(list, hs_path_from_filename(s_dir, fname_hostname));
-  /* The key files splitted in two. */
+  /* The key files split in two. */
   tor_snprintf(fname, sizeof(fname), "%s_secret_key", fname_keyfile_prefix);
   smartlist_add(list, hs_path_from_filename(s_dir, fname));
   tor_snprintf(fname, sizeof(fname), "%s_public_key", fname_keyfile_prefix);
@@ -3617,7 +3617,7 @@ hs_service_circuit_cleanup_on_close(const circuit_t *circ)
   }
 }
 
-/** This is called everytime the service map (v2 or v3) changes that is if an
+/** This is called every time the service map (v2 or v3) changes that is if an
  * element is added or removed. */
 void
 hs_service_map_has_changed(void)
@@ -3907,7 +3907,7 @@ hs_service_set_conn_addr_port(const origin_circuit_t *circ,
     goto err_no_close;
   }
 
-  /* Find a virtual port of that service mathcing the one in the connection if
+  /* Find a virtual port of that service matching the one in the connection if
    * successful, set the address in the connection. */
   if (hs_set_conn_addr_port(service->config.ports, conn) < 0) {
     log_info(LD_REND, "No virtual port mapping exists for port %d for "
@@ -4240,7 +4240,7 @@ hs_service_find(const ed25519_public_key_t *identity_pk)
   return find_service(hs_service_map, identity_pk);
 }
 
-/** Allocate and initilize a service object. The service configuration will
+/** Allocate and initialize a service object. The service configuration will
  * contain the default values. Return the newly allocated object pointer. This
  * function can't fail. */
 hs_service_t *
diff --git a/src/feature/hs/hs_service.h b/src/feature/hs/hs_service.h
index 974f46b960..ec0e83f2c2 100644
--- a/src/feature/hs/hs_service.h
+++ b/src/feature/hs/hs_service.h
@@ -3,7 +3,7 @@
 
 /**
  * \file hs_service.h
- * \brief Header file containing service data for the HS subsytem.
+ * \brief Header file containing service data for the HS subsystem.
  **/
 
 #ifndef TOR_HS_SERVICE_H
@@ -121,9 +121,9 @@ typedef struct hs_service_intropoints_t {
  *
  * Mutable elements are initialized when we build the descriptor but they are
  * also altered during the lifetime of the descriptor. They could be
- * _refreshed_ everytime we upload the descriptor (which happens multiple times
- * over the lifetime of the descriptor), or through periodic events. We do this
- * for elements like the descriptor revision counter and various
+ * _refreshed_ every time we upload the descriptor (which happens multiple
+ * times over the lifetime of the descriptor), or through periodic events. We
+ * do this for elements like the descriptor revision counter and various
  * certificates. See refresh_service_descriptor() and
  * update_service_descriptor_intro_points().
  */
@@ -299,7 +299,7 @@ typedef struct hs_service_state_t {
 /** Representation of a service running on this tor instance. */
 typedef struct hs_service_t {
   /** Onion address base32 encoded and NUL terminated. We keep it for logging
-   * purposes so we don't have to build it everytime. */
+   * purposes so we don't have to build it every time. */
   char onion_address[HS_SERVICE_ADDR_LEN_BASE32 + 1];
 
   /** Hashtable node: use to look up the service by its master public identity
diff --git a/src/feature/keymgt/loadkey.c b/src/feature/keymgt/loadkey.c
index 9b8f2f018a..6ea3df492d 100644
--- a/src/feature/keymgt/loadkey.c
+++ b/src/feature/keymgt/loadkey.c
@@ -638,7 +638,7 @@ ed_key_init_from_file(const char *fname, uint32_t flags,
     bad_cert = 1;
   } else if (signing_key && cert->signing_key_included &&
              ! ed25519_pubkey_eq(&signing_key->pubkey, &cert->signing_key)) {
-    tor_log(severity, LD_OR, "Certificate signed by unexpectd key!");
+    tor_log(severity, LD_OR, "Certificate signed by unexpected key!");
     bad_cert = 1;
   }
 
diff --git a/src/feature/nodelist/dirlist.c b/src/feature/nodelist/dirlist.c
index f6e4662a0f..576a6a2e49 100644
--- a/src/feature/nodelist/dirlist.c
+++ b/src/feature/nodelist/dirlist.c
@@ -66,7 +66,7 @@ add_trusted_dir_to_nodelist_addr_set(const dir_server_t *dir)
 }
 
 /** Go over the trusted directory server list and add their address(es) to the
- * nodelist address set. This is called everytime a new consensus is set. */
+ * nodelist address set. This is called every time a new consensus is set. */
 MOCK_IMPL(void,
 dirlist_add_trusted_dir_addresses, (void))
 {
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index c9928d2f9b..f263d0fe7c 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -127,7 +127,7 @@ typedef struct nodelist_t {
    *
    * Whenever a node's routerinfo or microdescriptor is about to change,
    * you should remove it from this map with node_remove_from_ed25519_map().
-   * Whenever a node's routerinfo or microdescriptor has just chaned,
+   * Whenever a node's routerinfo or microdescriptor has just changed,
    * you should add it to this map with node_add_to_ed25519_map().
    */
   HT_HEAD(nodelist_ed_map, node_t) nodes_by_ed_id;
@@ -1200,7 +1200,7 @@ node_supports_v3_rendezvous_point(const node_t *node)
 }
 
 /** Return true iff <b>node</b> supports the DoS ESTABLISH_INTRO cell
- * extenstion. */
+ * extension. */
 bool
 node_supports_establish_intro_dos_extension(const node_t *node)
 {
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index fcaf507efc..3f6e31bc3a 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -531,7 +531,7 @@ routers_have_same_or_addrs(const routerinfo_t *r1, const routerinfo_t *r2)
  * Nodes that don't have a routerinfo must be general-purpose nodes, because
  * routerstatuses and microdescriptors only come via consensuses.
  *
- * The <b>flags</b> chech that <b>node</b>:
+ * The <b>flags</b> check that <b>node</b>:
  *  - <b>CRN_NEED_UPTIME</b>: has more than a minimum uptime;
  *  - <b>CRN_NEED_CAPACITY</b>: has more than a minimum capacity;
  *  - <b>CRN_NEED_GUARD</b>: is a Guard;
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index b83bd9b758..3d9e50524f 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -1691,7 +1691,7 @@ launch_one_resolve(const char *address, uint8_t query_type,
       log_warn(LD_BUG, "Called with PTR query and unexpected address family");
     break;
   default:
-    log_warn(LD_BUG, "Called with unexpectd query type %d", (int)query_type);
+    log_warn(LD_BUG, "Called with unexpected query type %d", (int)query_type);
     break;
   }
 
diff --git a/src/feature/relay/ext_orport.c b/src/feature/relay/ext_orport.c
index 2cf30262f5..1bb8741e45 100644
--- a/src/feature/relay/ext_orport.c
+++ b/src/feature/relay/ext_orport.c
@@ -391,7 +391,7 @@ connection_ext_or_auth_handle_client_hash(connection_t *conn)
 }
 
 /** Handle data from <b>or_conn</b> received on Extended ORPort.
- *  Return -1 on error. 0 on unsufficient data. 1 on correct. */
+ *  Return -1 on error. 0 on insufficient data. 1 on correct. */
 static int
 connection_ext_or_auth_process_inbuf(or_connection_t *or_conn)
 {
diff --git a/src/feature/relay/relay_periodic.c b/src/feature/relay/relay_periodic.c
index ac54064901..a857ea8d92 100644
--- a/src/feature/relay/relay_periodic.c
+++ b/src/feature/relay/relay_periodic.c
@@ -6,7 +6,7 @@
 
 /**
  * @file relay_periodic.c
- * @brief Periodic functions for the relay subsytem
+ * @brief Periodic functions for the relay subsystem
  **/
 
 #include "orconfig.h"
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index 87ba29c130..b711c94eb6 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -174,7 +174,7 @@ router_should_check_reachability(int test_or, int test_dir)
 #define SELF_EXCLUDED_WARN_INTERVAL 3600
       static ratelim_t warning_limit=RATELIM_INIT(SELF_EXCLUDED_WARN_INTERVAL);
       log_fn_ratelim(&warning_limit, LOG_WARN, LD_CIRC,
-                 "Can't peform self-tests for this relay: we have "
+                 "Can't perform self-tests for this relay: we have "
                  "listed ourself in ExcludeNodes, and StrictNodes is set. "
                  "We cannot learn whether we are usable, and will not "
                  "be able to advertise ourself.");
diff --git a/src/feature/rend/rendcache.c b/src/feature/rend/rendcache.c
index 53fec7532f..04f6390a7f 100644
--- a/src/feature/rend/rendcache.c
+++ b/src/feature/rend/rendcache.c
@@ -37,7 +37,7 @@ STATIC digestmap_t *rend_cache_v2_dir = NULL;
  * or discard a new descriptor we just fetched. Here is a description of the
  * cache behavior.
  *
- * Everytime tor discards an IP (ex: receives a NACK), we add an entry to
+ * Every time tor discards an IP (ex: receives a NACK), we add an entry to
  * this cache noting the identity digest of the IP and it's failure type for
  * the service ID. The reason we indexed this cache by service ID is to
  * differentiate errors that can occur only for a specific service like a
@@ -257,7 +257,7 @@ rend_cache_free_all(void)
 /** Remove all entries that re REND_CACHE_FAILURE_MAX_AGE old. This is
  * called every second.
  *
- * We have to clean these regurlarly else if for whatever reasons an hidden
+ * We have to clean these regularly else if for whatever reasons an hidden
  * service goes offline and a client tries to connect to it during that
  * time, a failure entry is created and the client will be unable to connect
  * for a while even though the service has return online.  */
diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c
index 68dd8f4f4a..a2be900e2a 100644
--- a/src/feature/rend/rendservice.c
+++ b/src/feature/rend/rendservice.c
@@ -671,7 +671,7 @@ rend_service_prune_list_impl_(void)
                                         ocirc->build_state->chosen_exit)),
              safe_str_client(rend_data_get_address(ocirc->rend_data)));
     /* Reason is FINISHED because service has been removed and thus the
-     * circuit is considered old/uneeded. */
+     * circuit is considered old/unneeded. */
     circuit_mark_for_close(TO_CIRCUIT(ocirc), END_CIRC_REASON_FINISHED);
   }
   smartlist_free(surviving_services);
@@ -4138,7 +4138,7 @@ rend_consider_services_intro_points(time_t now)
      * list of the service. */
     unsigned int n_intro_points_to_open;
     /* Have an unsigned len so we can use it to compare values else gcc is
-     * not happy with unmatching signed comparaison. */
+     * not happy with unmatching signed comparison. */
     unsigned int intro_nodes_len;
     /* Different service are allowed to have the same introduction point as
      * long as they are on different circuit thus why we clear this list. */
@@ -4184,7 +4184,7 @@ rend_consider_services_intro_points(time_t now)
       intro->circuit_retries++;
     } SMARTLIST_FOREACH_END(intro);
 
-    /* Avoid mismatched signed comparaison below. */
+    /* Avoid mismatched signed comparison below. */
     intro_nodes_len = (unsigned int) smartlist_len(service->intro_nodes);
 
     /* Quiescent state, we have more or the equal amount of wanted node for
@@ -4274,7 +4274,7 @@ rend_consider_services_intro_points(time_t now)
         log_warn(LD_REND, "Error launching circuit to node %s for service %s.",
                  safe_str_client(extend_info_describe(intro->extend_info)),
                  safe_str_client(service->service_id));
-        /* This funcion will be called again by the main loop so this intro
+        /* This function will be called again by the main loop so this intro
          * point without a intro circuit will be retried on or removed after
          * a maximum number of attempts. */
       }
diff --git a/src/feature/stats/geoip_stats.c b/src/feature/stats/geoip_stats.c
index f9a2f19d2e..a733653dde 100644
--- a/src/feature/stats/geoip_stats.c
+++ b/src/feature/stats/geoip_stats.c
@@ -774,7 +774,7 @@ geoip_get_dirreq_history(dirreq_type_t type)
  *
  * Store a newly allocated comma-separated string in <a>ipver_str</a>
  * containing entries for clients connecting over IPv4 and IPv6. The
- * format is family=num where num is the nubmer of IPs we've seen
+ * format is family=num where num is the number of IPs we've seen
  * connecting over that protocol family, and family is 'v4' or 'v6'.
  *
  * Return 0 on success and -1 if we're missing geoip data. */
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index b6730e1226..3c22fda3b8 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -1829,7 +1829,7 @@ rep_hist_stored_maybe_new_hs(const crypto_pk_t *pubkey)
 
 /* The number of cells that are supposed to be hidden from the adversary
  * by adding noise from the Laplace distribution.  This value, divided by
- * EPSILON, is Laplace parameter b. It must be greather than 0. */
+ * EPSILON, is Laplace parameter b. It must be greater than 0. */
 #define REND_CELLS_DELTA_F 2048
 /* Security parameter for obfuscating number of cells with a value between
  * ]0.0, 1.0]. Smaller values obfuscate observations more, but at the same
diff --git a/src/lib/buf/buffers.c b/src/lib/buf/buffers.c
index 23fc1e23a6..e9d5f7f031 100644
--- a/src/lib/buf/buffers.c
+++ b/src/lib/buf/buffers.c
@@ -14,7 +14,7 @@
  *
  * All socket-backed and TLS-based connection_t objects have a pair of
  * buffers: one for incoming data, and one for outcoming data.  These are fed
- * and drained from functions in connection.c, trigged by events that are
+ * and drained from functions in connection.c, triggered by events that are
  * monitored in main.c.
  *
  * This module only handles the buffer implementation itself. To use a buffer
diff --git a/src/lib/conf/conftypes.h b/src/lib/conf/conftypes.h
index 081ebf397f..2207508ef9 100644
--- a/src/lib/conf/conftypes.h
+++ b/src/lib/conf/conftypes.h
@@ -273,7 +273,7 @@ typedef struct config_deprecation_t {
 #endif /* !defined(COCCI) */
 
 /**
- * Validation function: verify whether a configuation object is well-formed
+ * Validation function: verify whether a configuration object is well-formed
  * and consistent.
  *
  * On success, return 0.  On failure, set <b>msg_out</b> to a newly allocated
diff --git a/src/lib/confmgt/typedvar.c b/src/lib/confmgt/typedvar.c
index 1955302cdc..240c03a316 100644
--- a/src/lib/confmgt/typedvar.c
+++ b/src/lib/confmgt/typedvar.c
@@ -156,7 +156,7 @@ typed_var_copy(void *dest, const void *src, const var_type_def_t *def)
   if (BUG(!def))
     return -1; // LCOV_EXCL_LINE
   if (def->fns->copy) {
-    // If we have been provided a copy fuction, use it.
+    // If we have been provided a copy function, use it.
     return def->fns->copy(dest, src, def);
   }
 
diff --git a/src/lib/container/namemap.c b/src/lib/container/namemap.c
index e286cad947..5299c78e83 100644
--- a/src/lib/container/namemap.c
+++ b/src/lib/container/namemap.c
@@ -82,7 +82,7 @@ namemap_fmt_name(const namemap_t *map, unsigned id)
 
 /**
  * Helper: As namemap_get_id(), but requires that <b>name</b> is
- * <b>namelen</b> charaters long, and that <b>namelen</b> is no more than
+ * <b>namelen</b> characters long, and that <b>namelen</b> is no more than
  * MAX_NAMEMAP_NAME_LEN.
  */
 static unsigned
diff --git a/src/lib/crypt_ops/crypto_dh_openssl.c b/src/lib/crypt_ops/crypto_dh_openssl.c
index c5f7271596..f05afd8497 100644
--- a/src/lib/crypt_ops/crypto_dh_openssl.c
+++ b/src/lib/crypt_ops/crypto_dh_openssl.c
@@ -163,7 +163,7 @@ crypto_dh_init_openssl(void)
 
 /** Number of bits to use when choosing the x or y value in a Diffie-Hellman
  * handshake.  Since we exponentiate by this value, choosing a smaller one
- * lets our handhake go faster.
+ * lets our handshake go faster.
  */
 #define DH_PRIVATE_KEY_BITS 320
 
diff --git a/src/lib/crypt_ops/crypto_openssl_mgt.h b/src/lib/crypt_ops/crypto_openssl_mgt.h
index c67ab6467c..91df084a15 100644
--- a/src/lib/crypt_ops/crypto_openssl_mgt.h
+++ b/src/lib/crypt_ops/crypto_openssl_mgt.h
@@ -57,7 +57,7 @@
 #if OPENSSL_VERSION_NUMBER >= OPENSSL_VER(1,1,0,0,5) && \
   !defined(LIBRESSL_VERSION_NUMBER)
 /* OpenSSL as of 1.1.0pre4 has an "new" thread API, which doesn't require
- * seting up various callbacks.
+ * setting up various callbacks.
  *
  * OpenSSL 1.1.0pre4 has a messed up `ERR_remove_thread_state()` prototype,
  * while the previous one was restored in pre5, and the function made a no-op
diff --git a/src/lib/dispatch/dispatch.h b/src/lib/dispatch/dispatch.h
index 9c7c4833c2..63e96bcf8d 100644
--- a/src/lib/dispatch/dispatch.h
+++ b/src/lib/dispatch/dispatch.h
@@ -37,7 +37,7 @@
  * configure messages with their types, channels, and receivers.  Then, use
  * dispatch_new() with that dispatch_cfg_t to create the dispatch_t object.
  *
- * (We use a two-phase contruction procedure here to enable better static
+ * (We use a two-phase construction procedure here to enable better static
  * reasoning about publish/subscribe relationships.)
  *
  * Once you have a dispatch_t, you can queue messages on it with
diff --git a/src/lib/encoding/binascii.c b/src/lib/encoding/binascii.c
index 3e549eb8e3..5f68da183f 100644
--- a/src/lib/encoding/binascii.c
+++ b/src/lib/encoding/binascii.c
@@ -275,7 +275,7 @@ base64_encode(char *dest, size_t destlen, const char *src, size_t srclen,
   }
   switch (n_idx) {
   case 0:
-    /* 0 leftover bits, no pading to add. */
+    /* 0 leftover bits, no padding to add. */
     break;
   case 1:
     /* 8 leftover bits, pad to 12 bits, write the 2 6-bit values followed
diff --git a/src/lib/fs/path.c b/src/lib/fs/path.c
index 2eef4bded7..fc759f6169 100644
--- a/src/lib/fs/path.c
+++ b/src/lib/fs/path.c
@@ -180,7 +180,7 @@ clean_fname_for_stat(char *name)
 /** Modify <b>fname</b> to contain the name of its parent directory.  Doesn't
  * actually examine the filesystem; does a purely syntactic modification.
  *
- * The parent of the root director is considered to be iteself.
+ * The parent of the root director is considered to be itself.
  *
  * Path separators are the forward slash (/) everywhere and additionally
  * the backslash (\) on Win32.
@@ -319,7 +319,7 @@ make_path_absolute(const char *fname)
  * picture explanation here should be read first.
  *
  * Purpose of the functions:
- * - tor_glob - recevies a pattern and returns all the paths that result from
+ * - tor_glob - receives a pattern and returns all the paths that result from
  *   its glob expansion, globs can be present on all path components.
  * - get_glob_opened_files - receives a pattern and returns all the paths that
  *   are opened during its expansion (the paths before any path fragment that
@@ -328,10 +328,10 @@ make_path_absolute(const char *fname)
  *   allowed list.
  *
  * Due to OS API differences explained below, the implementation of tor_glob is
- * completly different for Windows and POSIX systems, so we ended up with three
- * different implementations:
+ * completely different for Windows and POSIX systems, so we ended up with
+ * three different implementations:
  * - tor_glob for POSIX - as POSIX glob does everything we need, we simply call
- *   it and process the results. This is completly implemented in tor_glob.
+ *   it and process the results. This is completely implemented in tor_glob.
  * - tor_glob for WIN32 - because the WIN32 API only supports expanding globs
  *   in the last path fragment, we need to expand the globs in each path
  *   fragment manually and call recursively to get the same behaviour as POSIX
diff --git a/src/lib/log/log.c b/src/lib/log/log.c
index 12e4dbaaa2..411408966b 100644
--- a/src/lib/log/log.c
+++ b/src/lib/log/log.c
@@ -784,7 +784,7 @@ logs_free_all(void)
 
 /** Flush the signal-safe log files.
  *
- * This function is safe to call from a signal handler. It is currenly called
+ * This function is safe to call from a signal handler. It is currently called
  * by the BUG() macros, when terminating the process on an abnormal condition.
  */
 void
diff --git a/src/lib/math/prob_distr.c b/src/lib/math/prob_distr.c
index 31d485120e..b322b4db5c 100644
--- a/src/lib/math/prob_distr.c
+++ b/src/lib/math/prob_distr.c
@@ -891,7 +891,7 @@ icdf_genpareto(double p, double mu, double sigma, double xi)
 
 /**
  * Compute the inverse of the SF of the GeneralizedPareto(mu, sigma,
- * xi) distribution.  Ill-conditioned for p near 1; conditon number is
+ * xi) distribution.  Ill-conditioned for p near 1; condition number is
  *
  *      -xi/(1 - p^{-xi})
  */
@@ -1000,7 +1000,7 @@ sample_uniform_interval(double p0, double a, double b)
      * since if we treat subnormals as having an implicit
      * zero bit before the `binary' point, their exponents
      * are all the same.  There is at most one carry/borrow
-     * bit, which can always be acommodated either in a
+     * bit, which can always be accommodated either in a
      * subnormal, or, at largest, in the implicit one bit
      * of a normal.
      *
diff --git a/src/lib/metrics/metrics_store.c b/src/lib/metrics/metrics_store.c
index abc093a564..57847cc37c 100644
--- a/src/lib/metrics/metrics_store.c
+++ b/src/lib/metrics/metrics_store.c
@@ -26,7 +26,7 @@ struct metrics_store_t {
   /** Indexed by metrics entry name. An entry is a smartlist_t of one or more
    * metrics_store_entry_t allowing for multiple metrics of the same name.
    *
-   * The reason we allow multiple entires is because there are cases where one
+   * The reason we allow multiple entries is because there are cases where one
    * metrics can be used twice by the same entity but with different labels.
    * One example is an onion service with multiple ports, the port specific
    * metrics will have a port value as a label. */
diff --git a/src/lib/net/address.c b/src/lib/net/address.c
index ea6c29db9f..21794fb4fc 100644
--- a/src/lib/net/address.c
+++ b/src/lib/net/address.c
@@ -2126,7 +2126,7 @@ tor_addr_port_copy(tor_addr_port_t *dest,
   memcpy(dest, source, sizeof(tor_addr_port_t));
 }
 
-/** Return true if <b>string</b> represents a valid IPv4 adddress in
+/** Return true if <b>string</b> represents a valid IPv4 address in
  * 'a.b.c.d' form.
  */
 int
diff --git a/src/lib/net/address.h b/src/lib/net/address.h
index bc8ec7744f..4c79db69d2 100644
--- a/src/lib/net/address.h
+++ b/src/lib/net/address.h
@@ -224,7 +224,7 @@ tor_addr_eq_ipv4h(const tor_addr_t *a, uint32_t u)
 #define TOR_ADDR_BUF_LEN 48
 
 /** Length of a buffer containing an IP address along with a port number and
- * a seperating colon.
+ * a separating colon.
  *
  * This allows enough space for
  *   "[ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255]:12345",
diff --git a/src/lib/process/process.c b/src/lib/process/process.c
index 12c1f9a772..d69b0ca115 100644
--- a/src/lib/process/process.c
+++ b/src/lib/process/process.c
@@ -374,7 +374,7 @@ process_get_protocol(const process_t *process)
   return process->protocol;
 }
 
-/** Set opague pointer to data.  This function allows you to store a pointer to
+/** Set opaque pointer to data.  This function allows you to store a pointer to
  * your own data in the given process. Use <b>process_get_data()</b> in the
  * various callback functions to retrieve the data again.
  *
diff --git a/src/lib/process/process_win32.c b/src/lib/process/process_win32.c
index 8683e17fc2..203df136aa 100644
--- a/src/lib/process/process_win32.c
+++ b/src/lib/process/process_win32.c
@@ -366,7 +366,7 @@ process_win32_write(struct process_t *process, buf_t *buffer)
 
   /* Because of the slightly weird API for WriteFileEx() we must set this to 0
    * before we call WriteFileEx() because WriteFileEx() does not reset the last
-   * error itself when it's succesful. See comment below after the call to
+   * error itself when it's successful. See comment below after the call to
    * GetLastError(). */
   SetLastError(0);
 
@@ -479,9 +479,9 @@ process_win32_trigger_completion_callbacks(void)
   }
 }
 
-/** Start the periodic timer which is reponsible for checking whether processes
- * are still alive and to make sure that the Tor process is periodically being
- * moved into an alertable state. */
+/** Start the periodic timer which is responsible for checking whether
+ * processes are still alive and to make sure that the Tor process is
+ * periodically being moved into an alertable state. */
 void
 process_win32_timer_start(void)
 {
@@ -547,7 +547,7 @@ process_win32_timer_callback(periodic_timer_t *timer, void *data)
       /* If process_win32_timer_test_process() returns true, it means that
        * smartlist_remove() might have been called on the list returned by
        * process_get_all_processes(). We start the loop over again until we
-       * have a succesful run over the entire list where the list was not
+       * have a successful run over the entire list where the list was not
        * modified. */
       if (process_win32_timer_test_process(process)) {
         done = false;
@@ -573,7 +573,7 @@ process_win32_timer_test_process(process_t *process)
   BOOL ret = FALSE;
   DWORD exit_code = 0;
 
-  /* Sometimes the Windows kernel wont give us the EOF/Broken Pipe error
+  /* Sometimes the Windows kernel won't give us the EOF/Broken Pipe error
    * message until some time after the process have actually terminated. We
    * make sure that our ReadFileEx() calls for the process have *all* returned
    * and both standard out and error have been marked as EOF before we try to
@@ -619,7 +619,7 @@ process_win32_timer_test_process(process_t *process)
 
 /** Create a new overlapped named pipe. This function creates a new connected,
  * named, pipe in <b>*read_pipe</b> and <b>*write_pipe</b> if the function is
- * succesful. Returns true on sucess, false on failure. */
+ * successful. Returns true on success, false on failure. */
 STATIC bool
 process_win32_create_pipe(HANDLE *read_pipe,
                           HANDLE *write_pipe,
@@ -840,7 +840,7 @@ process_win32_stdin_write_done(DWORD error_code,
     return;
 
   if (error_code == 0) {
-    /** Our data have been succesfully written. Clear our state and schedule
+    /** Our data have been successfully written. Clear our state and schedule
      * the next write. */
     win32_process->stdin_handle.data_available = 0;
     memset(win32_process->stdin_handle.buffer, 0,
@@ -850,7 +850,7 @@ process_win32_stdin_write_done(DWORD error_code,
     process_notify_event_stdin(process);
   } else if (error_code == ERROR_HANDLE_EOF ||
              error_code == ERROR_BROKEN_PIPE) {
-    /* Our WriteFileEx() call was succesful, but we reached the end of our
+    /* Our WriteFileEx() call was successful, but we reached the end of our
      * file.  We mark our handle as having reached EOF and returns. */
     tor_assert(byte_count == 0);
 
@@ -906,7 +906,7 @@ process_win32_read_from_handle(process_win32_handle_t *handle,
 
   /* Because of the slightly weird API for ReadFileEx() we must set this to 0
    * before we call ReadFileEx() because ReadFileEx() does not reset the last
-   * error itself when it's succesful. See comment below after the call to
+   * error itself when it's successful. See comment below after the call to
    * GetLastError(). */
   SetLastError(0);
 
@@ -972,7 +972,7 @@ process_win32_handle_read_completion(process_win32_handle_t *handle,
   handle->busy = false;
 
   if (error_code == 0) {
-    /* Our ReadFileEx() call was succesful and there is data for us. */
+    /* Our ReadFileEx() call was successful and there is data for us. */
 
     /* This cast should be safe since byte_count should never be larger than
      * BUFFER_SIZE. */
diff --git a/src/lib/process/restrict.c b/src/lib/process/restrict.c
index cd2a1c57b5..bf5ae8e500 100644
--- a/src/lib/process/restrict.c
+++ b/src/lib/process/restrict.c
@@ -44,7 +44,7 @@ tor_disable_debugger_attach(void)
 {
   int r = -1;
   log_debug(LD_CONFIG,
-            "Attemping to disable debugger attachment to Tor for "
+            "Attempting to disable debugger attachment to Tor for "
             "unprivileged users.");
 #if defined(__linux__) && defined(HAVE_SYS_PRCTL_H) \
   && defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
diff --git a/src/lib/process/waitpid.c b/src/lib/process/waitpid.c
index 33798f65f0..014bcf2927 100644
--- a/src/lib/process/waitpid.c
+++ b/src/lib/process/waitpid.c
@@ -113,7 +113,7 @@ clear_waitpid_callback(waitpid_callback_t *ent)
   tor_free(ent);
 }
 
-/** Helper: find the callack for <b>pid</b>; if there is one, run it,
+/** Helper: find the callback for <b>pid</b>; if there is one, run it,
  * reporting the exit status as <b>status</b>. */
 static void
 notify_waitpid_callback_by_pid(pid_t pid, int status)
diff --git a/src/lib/pubsub/pub_binding_st.h b/src/lib/pubsub/pub_binding_st.h
index d7c562fc35..e35f246c57 100644
--- a/src/lib/pubsub/pub_binding_st.h
+++ b/src/lib/pubsub/pub_binding_st.h
@@ -30,7 +30,7 @@ typedef struct pub_binding_t {
   /**
    * A template for the msg_t fields that are filled in for this message.
    * This is copied into outgoing messages, ensuring that their fields are set
-   * corretly.
+   * correctly.
    **/
   msg_t msg_template;
 } pub_binding_t;
diff --git a/src/lib/pubsub/pubsub_build.h b/src/lib/pubsub/pubsub_build.h
index 2781b8251a..87fcaf458e 100644
--- a/src/lib/pubsub/pubsub_build.h
+++ b/src/lib/pubsub/pubsub_build.h
@@ -55,7 +55,7 @@ void pubsub_builder_free_(pubsub_builder_t *);
 
 /**
  * Create a pubsub connector that a single subsystem will use to
- * register its messages.  The main-init code does this during susbsystem
+ * register its messages.  The main-init code does this during subsystem
  * initialization.
  */
 struct pubsub_connector_t *pubsub_connector_for_subsystem(pubsub_builder_t *,
diff --git a/src/lib/pubsub/pubsub_check.c b/src/lib/pubsub/pubsub_check.c
index dbcbb14746..84958e101a 100644
--- a/src/lib/pubsub/pubsub_check.c
+++ b/src/lib/pubsub/pubsub_check.c
@@ -31,7 +31,7 @@ static void pubsub_adjmap_add(pubsub_adjmap_t *map,
                                 const pubsub_cfg_t *item);
 
 /**
- * Helper: contruct and return a new pubsub_adjacency_map from <b>cfg</b>.
+ * Helper: construct and return a new pubsub_adjacency_map from <b>cfg</b>.
  * Return NULL on error.
  **/
 static pubsub_adjmap_t *
diff --git a/src/lib/pubsub/pubsub_macros.h b/src/lib/pubsub/pubsub_macros.h
index e5ffbe501a..4f5b60c19b 100644
--- a/src/lib/pubsub/pubsub_macros.h
+++ b/src/lib/pubsub/pubsub_macros.h
@@ -135,7 +135,7 @@
 #include "lib/pubsub/pubsub_flags.h"
 #include "lib/pubsub/pubsub_publish.h"
 
-/* Implemenation notes:
+/* Implementation notes:
  *
  * For a messagename "foo", the DECLARE_MESSAGE*() macros must declare:
  *
diff --git a/src/lib/subsys/initialization.md b/src/lib/subsys/initialization.md
index 012ab7000d..ee3104324d 100644
--- a/src/lib/subsys/initialization.md
+++ b/src/lib/subsys/initialization.md
@@ -50,7 +50,7 @@ Our current convention is to use the subsystem mechanism to initialize and
 clean up pieces of Tor.  The more recently updated pieces of Tor will use
 this mechanism.  For examples, see e.g. time_sys.c or log_sys.c.
 
-In simplest terms, a **subsytem** is a logically separate part of Tor that
+In simplest terms, a **subsystem** is a logically separate part of Tor that
 can be initialized, shut down, managed, and configured somewhat independently
 of the rest of the program.
 
@@ -59,7 +59,7 @@ initialize it, desconstruct it, and so on. To define a subsystem, we declare
 a `const` instance of subsys_fns_t.  See the documentation for subsys_fns_t
 for a full list of these functions.
 
-After defining a subsytem, it must be inserted in subsystem_list.c.  At that
+After defining a subsystem, it must be inserted in subsystem_list.c.  At that
 point, table-driven mechanisms in subsysmgr.c will invoke its functions when
 appropriate.
 
diff --git a/src/lib/subsys/subsys.h b/src/lib/subsys/subsys.h
index 4cff5f0b6e..abfc82d56a 100644
--- a/src/lib/subsys/subsys.h
+++ b/src/lib/subsys/subsys.h
@@ -194,7 +194,7 @@ typedef struct subsys_fns_t {
 
   /**
    * Return a list of metrics store of this subsystem. This is called
-   * everytime a request arrives on the MetricsPort.
+   * every time a request arrives on the MetricsPort.
    *
    * The list MUST contain metrics_store_t object and contains entries so it
    * can be formatted for the metrics port.
diff --git a/src/lib/time/compat_time.h b/src/lib/time/compat_time.h
index 5089e16ca5..08fd0f0c25 100644
--- a/src/lib/time/compat_time.h
+++ b/src/lib/time/compat_time.h
@@ -60,7 +60,7 @@
  *
  * Q: So, what backends is monotime_coarse using?
  *
- * A: Generally speaking, it uses "whatever monotonic-ish time implemenation
+ * A: Generally speaking, it uses "whatever monotonic-ish time implementation
  * does not require a context switch."  The various implementations provide
  * this by having a view of the current time in a read-only memory page that
  * is updated with a frequency corresponding to the kernel's tick count.
diff --git a/src/lib/time/tvdiff.c b/src/lib/time/tvdiff.c
index cbad5a48b8..14a89bc76e 100644
--- a/src/lib/time/tvdiff.c
+++ b/src/lib/time/tvdiff.c
@@ -30,7 +30,7 @@ tv_secdiff_impl(const struct timeval *start, const struct timeval *end)
   const int64_t s = (int64_t)start->tv_sec;
   const int64_t e = (int64_t)end->tv_sec;
 
-  /* This may not be the most efficient way of implemeting this check,
+  /* This may not be the most efficient way of implementing this check,
    * but it's easy to see that it's correct and doesn't overflow */
 
   if (s > 0 && e < INT64_MIN + s) {
diff --git a/src/lib/trace/debug.h b/src/lib/trace/debug.h
index 84a2867a6d..4ee14fab8d 100644
--- a/src/lib/trace/debug.h
+++ b/src/lib/trace/debug.h
@@ -20,7 +20,7 @@
 /* Send every event to a debug log level. This is useful to debug new trace
  * events without implementing them for a specific event tracing framework.
  *
- * NOTE: arguments can't be used becaue there is no easy generic ways to learn
+ * NOTE: arguments can't be used because there is no easy generic ways to learn
  * their type and amount. It is probably doable with massive C pre-processor
  * trickery but this is meant to be simple. */
 
diff --git a/src/lib/trace/trace_stub.c b/src/lib/trace/trace_stub.c
index 9043efe360..fddf8c63f0 100644
--- a/src/lib/trace/trace_stub.c
+++ b/src/lib/trace/trace_stub.c
@@ -3,7 +3,7 @@
 
 /**
  * \file trace_stub.c
- * \brief Stub declaratinos for use when trace library is disabled.
+ * \brief Stub declarations for use when trace library is disabled.
  **/
 
 #include "lib/subsys/subsys.h"
diff --git a/src/rust/crypto/rand/rng.rs b/src/rust/crypto/rand/rng.rs
index 96e112799e..644a5c20b1 100644
--- a/src/rust/crypto/rand/rng.rs
+++ b/src/rust/crypto/rand/rng.rs
@@ -33,7 +33,7 @@ mod internal {
     /// A wrapper around OpenSSL's RNG.
     pub struct TorRng {
         // This private, zero-length field forces the struct to be treated the
-        // same as its opaque C couterpart.
+        // same as its opaque C counterpart.
         _unused: [u8; 0],
     }
 
@@ -83,7 +83,7 @@ mod internal {
     /// obtained from the operating system.
     pub struct TorStrongestRng {
         // This private, zero-length field forces the struct to be treated the
-        // same as its opaque C couterpart.
+        // same as its opaque C counterpart.
         _unused: [u8; 0],
     }
 
diff --git a/src/rust/external/crypto_digest.rs b/src/rust/external/crypto_digest.rs
index 454f836bad..873f75e7a3 100644
--- a/src/rust/external/crypto_digest.rs
+++ b/src/rust/external/crypto_digest.rs
@@ -79,7 +79,7 @@ const N_COMMON_DIGEST_ALGORITHMS: usize = DIGEST_SHA256 as usize + 1;
 #[allow(non_camel_case_types)]
 struct crypto_digest_t {
     // This private, zero-length field forces the struct to be treated the same
-    // as its opaque C couterpart.
+    // as its opaque C counterpart.
     _unused: [u8; 0],
 }
 
@@ -89,7 +89,7 @@ struct crypto_digest_t {
 #[allow(non_camel_case_types)]
 struct crypto_xof_t {
     // This private, zero-length field forces the struct to be treated the same
-    // as its opaque C couterpart.
+    // as its opaque C counterpart.
     _unused: [u8; 0],
 }
 
@@ -254,7 +254,7 @@ impl CryptoDigest {
     /// * `crypto_digest256_new`
     /// * `crypto_digest512_new`
     /// * `tor_malloc` (called by `crypto_digest256_new`, but we make
-    ///    assumptions about its behvaiour and return values here)
+    ///    assumptions about its behaviour and return values here)
     pub fn new(algorithm: Option<DigestAlgorithm>) -> CryptoDigest {
         let digest: *mut crypto_digest_t;
 
diff --git a/src/rust/tor_allocate/tor_allocate.rs b/src/rust/tor_allocate/tor_allocate.rs
index 682a524ee7..7b35e2451f 100644
--- a/src/rust/tor_allocate/tor_allocate.rs
+++ b/src/rust/tor_allocate/tor_allocate.rs
@@ -60,7 +60,7 @@ pub fn allocate_and_copy_string(src: &str) -> *mut c_char {
     unsafe { ptr::copy_nonoverlapping(bytes.as_ptr(), dest, size) };
 
     // set the last byte as null, using the ability to index into a slice
-    // rather than doing pointer arithmatic
+    // rather than doing pointer arithmetic
     let slice = unsafe { slice::from_raw_parts_mut(dest, size_with_null_byte) };
     slice[size] = 0; // add a null terminator
 
diff --git a/src/rust/tor_log/tor_log.rs b/src/rust/tor_log/tor_log.rs
index bbaf97129c..391cb32ab3 100644
--- a/src/rust/tor_log/tor_log.rs
+++ b/src/rust/tor_log/tor_log.rs
@@ -103,7 +103,7 @@ pub mod log {
         static LD_GENERAL_: u64;
     }
 
-    /// Translate Rust defintions of log domain levels to C. This exposes a 1:1
+    /// Translate Rust definitions of log domain levels to C. This exposes a 1:1
     /// mapping between types.
     #[inline]
     pub unsafe fn translate_domain(domain: LogDomain) -> u64 {
@@ -113,7 +113,7 @@ pub mod log {
         }
     }
 
-    /// Translate Rust defintions of log severity levels to C. This exposes a
+    /// Translate Rust definitions of log severity levels to C. This exposes a
     /// 1:1 mapping between types.
     #[inline]
     pub unsafe fn translate_severity(severity: LogSeverity) -> c_int {
diff --git a/src/test/test_address.c b/src/test/test_address.c
index 17479d69c2..e7007f22f3 100644
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@ -713,7 +713,7 @@ test_address_udp_socket_trick_blackbox(void *arg)
 
 #else /* !(0) */
   /* Both of the blackbox test cases fail horribly if:
-   *  * The host has no external addreses.
+   *  * The host has no external addresses.
    *  * There are multiple interfaces with either AF_INET or AF_INET6.
    *  * The last address isn't the one associated with the default route.
    *
diff --git a/src/test/test_channel.c b/src/test/test_channel.c
index c86327ceb4..d43f6e010a 100644
--- a/src/test/test_channel.c
+++ b/src/test/test_channel.c
@@ -729,7 +729,7 @@ test_channel_inbound_cell(void *arg)
   tt_int_op(chan->reason_for_closing, OP_EQ, CHANNEL_CLOSE_REQUESTED);
   tt_int_op(test_close_called, OP_EQ, old_count + 1);
 
-  /* This closes the channe so it calls in the scheduler, make sure of it. */
+  /* This closes the channel so it calls in the scheduler, make sure of it. */
   old_count = test_releases_count;
   chan_test_finish_close(chan);
   tt_int_op(test_releases_count, OP_EQ, old_count + 1);
diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c
index 2c11d107d0..d6e3300a30 100644
--- a/src/test/test_circuitmux.c
+++ b/src/test/test_circuitmux.c
@@ -191,7 +191,7 @@ test_cmux_attach_circuit(void *arg)
   tt_int_op(circuitmux_is_circuit_attached(pchan->cmux, circ), OP_EQ, 1);
   tt_int_op(circuitmux_is_circuit_attached(nchan->cmux, circ), OP_EQ, 1);
 
-  /* Query the chanid<->circid map in the cmux subsytem with what we just
+  /* Query the chanid<->circid map in the cmux subsystem with what we just
    * created and validate the cell direction. */
   cdir = circuitmux_attached_circuit_direction(pchan->cmux, circ);
   tt_int_op(cdir, OP_EQ, CELL_DIRECTION_IN);
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index c3346e2e03..86baf54f40 100644
--- a/src/test/test_circuitpadding.c
+++ b/src/test/test_circuitpadding.c
@@ -1374,7 +1374,7 @@ test_circuitpadding_wronghop(void *arg)
   ret = circpad_handle_padding_negotiated(relay_side, &cell, NULL);
   tt_int_op(ret, OP_EQ, -1);
 
-  /* 7. Test garbled negotated cell (bad command 255) */
+  /* 7. Test garbled negotiated cell (bad command 255) */
   memset(&cell, 0, sizeof(cell));
   ret = circpad_handle_padding_negotiate(relay_side, &cell);
   tt_int_op(ret, OP_EQ, -1);
@@ -2338,7 +2338,7 @@ helper_circpad_circ_distribution_machine_setup(int min, int max)
 }
 
 /** Simple test that the padding delays sampled from a uniform distribution
- *  actually faill within the uniform distribution range. */
+ *  actually fail within the uniform distribution range. */
 static void
 test_circuitpadding_sample_distribution(void *arg)
 {
@@ -3032,7 +3032,7 @@ test_circuitpadding_hs_machines(void *arg)
 
   /* Test logic:
    *
-   * 1) Register the HS machines, which aim to hide the presense of
+   * 1) Register the HS machines, which aim to hide the presence of
    *    onion service traffic on the client-side
    *
    * 2) Call helper_test_hs_machines() to perform tests for the intro circuit
diff --git a/src/test/test_config.c b/src/test/test_config.c
index 48a7091ef6..a0278f9422 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -408,7 +408,7 @@ good_bridge_line_test(const char *string, const char *test_addrport,
     tor_free(tmp);
   }
 
-  /* If we were asked to validate a transport name, make sure tha it
+  /* If we were asked to validate a transport name, make sure that it
      matches with the transport name that was parsed. */
   if (test_transport && !bridge_line->transport_name)
     tt_abort();
@@ -995,7 +995,7 @@ static const char *ret_addr_lookup_01010101[2] = {
 };
 
 /** This mock function is meant to replace tor_addr_lookup().
- * It answers with 1.1.1.1 as IP adddress that resulted from lookup.
+ * It answers with 1.1.1.1 as IP address that resulted from lookup.
  * This function increments <b>n_hostname_01010101</b> counter by one
  * every time it is called.
  */
@@ -1022,7 +1022,7 @@ tor_addr_lookup_01010101(const char *name, uint16_t family, tor_addr_t *addr)
 static int n_hostname_localhost = 0;
 
 /** This mock function is meant to replace tor_addr_lookup().
- * It answers with 127.0.0.1 as IP adddress that resulted from lookup.
+ * It answers with 127.0.0.1 as IP address that resulted from lookup.
  * This function increments <b>n_hostname_localhost</b> counter by one
  * every time it is called.
  */
@@ -1408,7 +1408,7 @@ test_config_find_my_address_mixed(void *arg)
  * AF_INET6 but we have one interface to do so thus we run the same exact unit
  * tests for both without copying them. */
 typedef struct find_my_address_params_t {
-  /* Index where the mock function results are located. For intance,
+  /* Index where the mock function results are located. For instance,
    * tor_addr_lookup_01010101() will have its returned value depending on the
    * family in ret_addr_lookup_01010101[].
    *
@@ -4912,7 +4912,7 @@ test_config_parse_port_config__ports__ports_given(void *data)
   port_cfg = (port_cfg_t *)smartlist_get(slout, 0);
   tt_int_op(port_cfg->entry_cfg.session_group, OP_EQ, 1111122);
 
-  // Test success with a zero unix domain socket, and doesnt add it to out
+  // Test success with a zero unix domain socket, and doesn't add it to out
   config_free_lines(config_port_valid); config_port_valid = NULL;
   SMARTLIST_FOREACH(slout,port_cfg_t *,pf,port_cfg_free(pf));
   smartlist_clear(slout);
@@ -4922,7 +4922,7 @@ test_config_parse_port_config__ports__ports_given(void *data)
   tt_int_op(ret, OP_EQ, 0);
   tt_int_op(smartlist_len(slout), OP_EQ, 0);
 
-  // Test success with a one unix domain socket, and doesnt add it to out
+  // Test success with a one unix domain socket, and doesn't add it to out
   config_free_lines(config_port_valid); config_port_valid = NULL;
   SMARTLIST_FOREACH(slout,port_cfg_t *,pf,port_cfg_free(pf));
   smartlist_clear(slout);
diff --git a/src/test/test_confparse.c b/src/test/test_confparse.c
index 21301ce75e..abd53dea68 100644
--- a/src/test/test_confparse.c
+++ b/src/test/test_confparse.c
@@ -344,7 +344,7 @@ test_confparse_assign_deprecated(void *arg)
   config_mgr_free(mgr);
 }
 
-/* Try to re-assign an option name that has been depreacted in favor of
+/* Try to re-assign an option name that has been deprecated in favor of
  * another. */
 static void
 test_confparse_assign_replaced(void *arg)
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c
index 4bec6baeb0..f4adf43549 100644
--- a/src/test/test_consdiffmgr.c
+++ b/src/test/test_consdiffmgr.c
@@ -689,7 +689,7 @@ static void
 test_consdiffmgr_cleanup_bad_valid_after(void *arg)
 {
   /* This will seem cleanable, but isn't, because its valid-after time is
-   * misformed. */
+   * malformed. */
 
   (void)arg;
   config_line_t *labels = NULL;
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 4dec05ecfd..d62dd3fb9e 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -1388,7 +1388,7 @@ test_dir_load_routers(void *arg)
   smartlist_add_strdup(chunks, EX_RI_BAD_PORTS);
   smartlist_add_strdup(chunks, EX_RI_BAD_TOKENS);
 
-  /* not ADDing MINIMIAL */
+  /* not ADDing MINIMAL */
   ADD(EX_RI_MAXIMAL);
   ADD(EX_RI_BAD_FINGERPRINT);
   ADD(EX_RI_BAD_SIG1);
@@ -1537,7 +1537,7 @@ test_dir_load_extrainfo(void *arg)
   smartlist_add_strdup(chunks, EX_EI_BAD_PUBLISHED);
   smartlist_add_strdup(chunks, EX_EI_BAD_TOKENS);
 
-  /* not ADDing MINIMIAL */
+  /* not ADDing MINIMAL */
   ADD(EX_EI_MAXIMAL);
   ADD(EX_EI_BAD_NICKNAME);
   /* Not ADDing BAD_PUBLISHED */
@@ -7044,7 +7044,7 @@ test_dir_dirserv_load_fingerprint_file(void *arg)
   expect_log_msg_containing("Invalid fingerprint");
   teardown_capture_of_logs();
 
-  // Test: Formt string exploit
+  // Test: Format string exploit
   setup_capture_of_logs(LOG_NOTICE);
   write_str_to_file(fname, router_lines_bad_fmt_str, 0);
   tt_int_op(dirserv_load_fingerprint_file(), OP_EQ, 0);
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 53c81b8599..f717f83932 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -331,10 +331,10 @@ test_dir_handle_get_rendezvous2_on_encrypted_conn_not_well_formed(void *data)
   TO_CONN(conn)->linked = 1;
   tt_assert(connection_dir_is_encrypted(conn));
 
-  //TODO: this cant be reached because rend_valid_descriptor_id() prevents this
-  //case to happen. This test is the same as
-  //test_dir_handle_get_rendezvous2_on_encrypted_conn_with_invalid_desc_id
-  //We should refactor to remove the case from the switch.
+  //TODO: this can't be reached because rend_valid_descriptor_id() prevents
+  //this case to happen. This test is the same as
+  //test_dir_handle_get_rendezvous2_on_encrypted_conn_with_invalid_desc_id We
+  //should refactor to remove the case from the switch.
 
   const char *req = RENDEZVOUS2_GET("1bababababababababababababababab");
   tt_int_op(directory_handle_command_get(conn, req, NULL, 0), OP_EQ, 0);
diff --git a/src/test/test_dirvote.c b/src/test/test_dirvote.c
index bc2d1150d6..b5e57ad071 100644
--- a/src/test/test_dirvote.c
+++ b/src/test/test_dirvote.c
@@ -18,7 +18,7 @@
 #include "test/test.h"
 
 /**
- * This struct holds the various informations that are needed for router
+ * This struct holds the various information that are needed for router
  * comparison. Each router in the test function has one, and they are all
  * put in a global digestmap, router_properties
  */
diff --git a/src/test/test_dispatch.c b/src/test/test_dispatch.c
index 77f33e4b15..f7f8ecdc03 100644
--- a/src/test/test_dispatch.c
+++ b/src/test/test_dispatch.c
@@ -135,7 +135,7 @@ test_dispatch_simple(void *arg)
   tor_free(recv2_received);
 }
 
-/* Construct a dispatch_t with a message and no reciever; make sure that it
+/* Construct a dispatch_t with a message and no receiver; make sure that it
  * gets dropped properly. */
 static void
 test_dispatch_no_recipient(void *arg)
diff --git a/src/test/test_geoip.c b/src/test/test_geoip.c
index bf9932c169..95afe4d6c4 100644
--- a/src/test/test_geoip.c
+++ b/src/test/test_geoip.c
@@ -402,7 +402,7 @@ test_geoip_load_file(void *arg)
   char *contents = NULL;
   char *dhex = NULL;
 
-  /* A nonexistant filename should fail. */
+  /* A nonexistent filename should fail. */
   tt_int_op(-1, OP_EQ,
             geoip_load_file(AF_INET, "/you/did/not/put/a/file/here/I/hope",
                             LOG_INFO));
@@ -412,7 +412,7 @@ test_geoip_load_file(void *arg)
   tt_str_op("??", OP_EQ, geoip_get_country_name(0));
   /* Any lookup attempt should say "-1" because we have no info */
   tt_int_op(-1, OP_EQ, geoip_get_country_by_ipv4(0x01020304));
-  /* There should be no 'digest' for a nonexistant file */
+  /* There should be no 'digest' for a nonexistent file */
   tt_str_op("0000000000000000000000000000000000000000", OP_EQ,
             geoip_db_digest(AF_INET));
 
@@ -467,7 +467,7 @@ test_geoip6_load_file(void *arg)
   char *contents = NULL;
   char *dhex = NULL;
 
-  /* A nonexistant filename should fail. */
+  /* A nonexistent filename should fail. */
   tt_int_op(-1, OP_EQ,
             geoip_load_file(AF_INET6, "/you/did/not/put/a/file/here/I/hope",
                             LOG_INFO));
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index f965344ce0..dc3b2ff72c 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -1486,7 +1486,7 @@ test_purge_ephemeral_client_auth(void *arg)
   MOCK(get_options, mock_get_options);
   MOCK(write_str_to_file, mock_write_str_to_file);
 
-  /* Boggus directory so when we try to write the permanent client
+  /* Bogus directory so when we try to write the permanent client
    * authorization data to disk, we don't fail. See
    * store_permanent_client_auth_credentials() for more details. */
   mocked_options.ClientOnionAuthDir = tor_strdup("auth_dir");
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 295d9cdb62..b0f408d662 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -482,7 +482,7 @@ test_desc_reupload_logic(void *arg)
    *  1) Upload descriptor to HSDirs
    *     CHECK that previous_hsdirs list was populated.
    *  2) Then call router_dir_info_changed() without an HSDir set change.
-   *     CHECK that no reuplod occurs.
+   *     CHECK that no reupload occurs.
    *  3) Now change the HSDir set, and call dir_info_changed() again.
    *     CHECK that reupload occurs.
    *  4) Finally call service_desc_schedule_upload().
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index 80bbf547dc..6e41c4994f 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -619,7 +619,7 @@ test_hs_control_store_permanent_creds(void *arg)
   tt_assert(creds_file_str);
   tt_str_op(creds_file_str, OP_EQ,
          "2fvhjskjet3n5syd6yfg5lhvwcs62bojmthr35ko5bllr3iqdb4ctdyd:descriptor:"
-         /* This is the base32 represenation of the base64 iJ1t... key above */
+         /* base32 representation of the base64 iJ1t... key above */
          "x25519:rcow3dfavmyanyqvhwnvnmfdqw34ydtrgv7jnelmqs4wi4uuxrca");
 
   tor_free(args);
@@ -643,7 +643,7 @@ test_hs_control_store_permanent_creds(void *arg)
   tt_assert(creds_file_str);
   tt_str_op(creds_file_str, OP_EQ,
          "2fvhjskjet3n5syd6yfg5lhvwcs62bojmthr35ko5bllr3iqdb4ctdyd:descriptor:"
-         /* This is the base32 represenation of the base64 UDRv... key above */
+         /* base32 representation of the base64 UDRv... key above */
          "x25519:ka2g6zf33qti2ecexpbx4stan3nsu3sijbiqm4t2rwctigxajnpq");
 
   /* Now for our next act!!! Actually get the HS client subsystem to parse the
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index ad38547495..e61d33ecb3 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -159,7 +159,7 @@ mock_router_have_minimum_dir_info_false(void)
 }
 
 /* Helper: from a set of options in conf, configure a service which will add
- * it to the staging list of the HS subsytem. */
+ * it to the staging list of the HS subsystem. */
 static int
 helper_config_service(const char *conf)
 {
@@ -778,7 +778,7 @@ mock_node_get_by_id(const char *digest)
 {
   (void) digest;
   memset(mock_node.identity, 'A', DIGEST_LEN);
-  /* Only return the matchin identity of As */
+  /* Only return the matching identity of As */
   if (!tor_memcmp(mock_node.identity, digest, DIGEST_LEN)) {
     return &mock_node;
   }
diff --git a/src/test/test_metrics.c b/src/test/test_metrics.c
index 1c645813a4..96eadc6b43 100644
--- a/src/test/test_metrics.c
+++ b/src/test/test_metrics.c
@@ -3,7 +3,7 @@
 
 /**
  * \file test_metrics.c
- * \brief Test lib/metrics and feature/metrics functionnalities
+ * \brief Test lib/metrics and feature/metrics functionalities
  */
 
 #define CONFIG_PRIVATE
@@ -233,7 +233,7 @@ test_store(void *arg)
   tt_assert(entry);
   metrics_store_entry_add_label(entry, TEST_METRICS_ENTRY_LABEL_2);
 
-  /* Make sure _both_ entires are there. */
+  /* Make sure _both_ entries are there. */
   const smartlist_t *entries =
     metrics_store_get_all(store, TEST_METRICS_ENTRY_NAME);
   tt_assert(entries);
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c
index 1dd3f7a68d..d3bc89673b 100644
--- a/src/test/test_periodic_event.c
+++ b/src/test/test_periodic_event.c
@@ -101,7 +101,7 @@ test_pe_launch(void *arg)
   periodic_events_on_new_options(options);
 
 #if 0
-  /* Lets make sure that before intialization, we can't scan the periodic
+  /* Lets make sure that before initialization, we can't scan the periodic
    * events list and launch them. Lets try by being a Client. */
   /* XXXX We make sure these events are initialized now way earlier than we
    * did before. */
diff --git a/src/test/test_prob_distr.c b/src/test/test_prob_distr.c
index 541a81df3a..da65a0f26d 100644
--- a/src/test/test_prob_distr.c
+++ b/src/test/test_prob_distr.c
@@ -442,7 +442,7 @@ test_log_logistic(void *arg)
     /* x is a point in the support of the LogLogistic distribution */
     double x;
     /* 'p' is the probability that a random variable X for a given LogLogistic
-     * probability ditribution will take value less-or-equal to x */
+     * probability distribution will take value less-or-equal to x */
     double p;
     /* 'np' is the probability that a random variable X for a given LogLogistic
      * probability distribution will take value greater-or-equal to x. */
@@ -591,7 +591,7 @@ test_weibull(void *arg)
     /* x is a point in the support of the Weibull distribution */
     double x;
     /* 'p' is the probability that a random variable X for a given Weibull
-     * probability ditribution will take value less-or-equal to x */
+     * probability distribution will take value less-or-equal to x */
     double p;
     /* 'np' is the probability that a random variable X for a given Weibull
      * probability distribution will take value greater-or-equal to x. */
diff --git a/src/test/test_process.c b/src/test/test_process.c
index c1da6db278..b5185242d3 100644
--- a/src/test/test_process.c
+++ b/src/test/test_process.c
@@ -156,7 +156,7 @@ test_default_values(void *arg)
   /* Our command was given to the process_t's constructor in process_new(). */
   tt_str_op("/path/to/nothing", OP_EQ, process_get_command(process));
 
-  /* Make sure we are listed in the list of proccesses. */
+  /* Make sure we are listed in the list of processes. */
   tt_assert(smartlist_contains(process_get_all_processes(),
                                process));
 
diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c
index 3a317be5fe..6f5bc7e770 100644
--- a/src/test/test_relaycell.c
+++ b/src/test/test_relaycell.c
@@ -491,7 +491,7 @@ subtest_halfstream_insertremove(int num)
   entryconn = fake_entry_conn(circ, 23);
   edgeconn = ENTRY_TO_EDGE_CONN(entryconn);
 
-  /* Explicity test all operations on an absent stream list */
+  /* Explicitly test all operations on an absent stream list */
   tt_int_op(connection_half_edge_is_valid_data(circ->half_streams,
             23), OP_EQ, 0);
   tt_int_op(connection_half_edge_is_valid_connected(circ->half_streams,
@@ -570,7 +570,7 @@ subtest_halfstream_insertremove(int num)
   }
   tt_int_op(smartlist_len(circ->half_streams), OP_EQ, 0);
 
-  /* Explicity test all operations on an empty stream list */
+  /* Explicitly test all operations on an empty stream list */
   tt_int_op(connection_half_edge_is_valid_data(circ->half_streams,
             23), OP_EQ, 0);
   tt_int_op(connection_half_edge_is_valid_connected(circ->half_streams,
diff --git a/src/test/test_sendme.c b/src/test/test_sendme.c
index 2ff4809124..b34c7ae143 100644
--- a/src/test/test_sendme.c
+++ b/src/test/test_sendme.c
@@ -56,7 +56,7 @@ test_v1_record_digest(void *arg)
   circ = TO_CIRCUIT(or_circ);
 
   /* The package window has to be a multiple of CIRCWINDOW_INCREMENT minus 1
-   * in order to catched the CIRCWINDOW_INCREMENT-nth cell. Try something that
+   * in order to catch the CIRCWINDOW_INCREMENT-nth cell. Try something that
    * shouldn't be noted. */
   circ->package_window = CIRCWINDOW_INCREMENT;
   sendme_record_cell_digest_on_circ(circ, NULL);
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 148eb5cf90..950cdd3d33 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -1400,7 +1400,7 @@ test_state_transition(void *arg)
     sr_state_delete_commits();
     tt_int_op(digestmap_size(state->commits), OP_EQ, 0);
     /* Add it back so we can continue the rest of the test because after
-     * deletiong our commit will be freed so generate a new one. */
+     * deleting our commit will be freed so generate a new one. */
     commit = sr_generate_our_commit(now, mock_cert);
     tt_assert(commit);
     sr_state_add_commit(commit);
@@ -1541,7 +1541,7 @@ test_keep_commit(void *arg)
    * in the state and commitment and reveal values match. */
   tt_int_op(should_keep_commit(commit, commit->rsa_identity,
                                SR_PHASE_REVEAL), OP_EQ, 1);
-  /* The commit shouldn't be kept if it's not verified that is no matchin
+  /* The commit shouldn't be kept if it's not verified that is no matching
    * hashed reveal. */
   {
     /* Let's save the hash reveal so we can restore it. */
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 1c555e4d06..b3a1e2caca 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4514,7 +4514,7 @@ test_util_glob(void *ptr)
     smartlist_free(results); \
   } while (0);
 
-  // wilcards at beginning
+  // wildcards at beginning
   const char *results_test1[] = {"dir2", "file2"};
   TEST("*2");
   EXPECT(results_test1);
@@ -4761,7 +4761,7 @@ test_util_get_glob_opened_files(void *ptr)
   TEST("*"PATH_SEPARATOR);
   EXPECT(results_test2);
 
-  // wilcards in multiple path components
+  // wildcards in multiple path components
 #ifndef _WIN32
   const char *results_test3[] = {"", "dir1", "dir2", "empty", "file1", "file2",
                                  "forbidden"};
@@ -6193,7 +6193,7 @@ test_util_hostname_validation(void *arg)
 
   // XXX: do we allow single-label DNS names?
   // We shouldn't for SOCKS (spec says "contains a fully-qualified domain name"
-  // but only test pathologically malformed traling '.' cases for now.
+  // but only test pathologically malformed trailing '.' cases for now.
   tt_assert(!string_is_valid_nonrfc_hostname("."));
   tt_assert(!string_is_valid_nonrfc_hostname(".."));
 



More information about the tor-commits mailing list