summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c2
-rw-r--r--src/common/compat.c2
-rw-r--r--src/common/compat_openssl.h2
-rw-r--r--src/common/compat_time.c2
-rw-r--r--src/common/crypto.c4
-rw-r--r--src/common/crypto_ed25519.c10
-rw-r--r--src/common/crypto_rsa.c2
-rw-r--r--src/common/timers.c2
-rw-r--r--src/common/tortls.c2
-rw-r--r--src/common/util.c6
10 files changed, 17 insertions, 17 deletions
diff --git a/src/common/address.c b/src/common/address.c
index d96ec514b1..7ff81206e5 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1125,7 +1125,7 @@ tor_addr_compare_masked(const tor_addr_t *addr1, const tor_addr_t *addr2,
case AF_UNIX:
/* HACKHACKHACKHACKHACK:
* tor_addr_t doesn't contain a copy of sun_path, so it's not
- * possible to comapre this at all.
+ * possible to compare this at all.
*
* Since the only time we currently actually should be comparing
* 2 AF_UNIX addresses is when dealing with ISO_CLIENTADDR (which
diff --git a/src/common/compat.c b/src/common/compat.c
index 6a61c6c919..39d2f18f4a 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -2455,7 +2455,7 @@ get_environment(void)
/** Get name of current host and write it to <b>name</b> array, whose
* length is specified by <b>namelen</b> argument. Return 0 upon
- * successfull completion; otherwise return return -1. (Currently,
+ * successful completion; otherwise return return -1. (Currently,
* this function is merely a mockable wrapper for POSIX gethostname().)
*/
MOCK_IMPL(int,
diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h
index d1b871b0f1..1299ac36bb 100644
--- a/src/common/compat_openssl.h
+++ b/src/common/compat_openssl.h
@@ -12,7 +12,7 @@
/**
* \file compat_openssl.h
*
- * \brief compatability definitions for working with different openssl forks
+ * \brief compatibility definitions for working with different openssl forks
**/
#if !defined(LIBRESSL_VERSION_NUMBER) && \
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index 8cecff2783..183a60a480 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -807,7 +807,7 @@ monotime_coarse_absolute_msec(void)
return monotime_coarse_absolute_nsec() / ONE_MILLION;
}
#else
-#define initalized_at_coarse initialized_at
+#define initialized_at_coarse initialized_at
#endif /* defined(MONOTIME_COARSE_FN_IS_DIFFERENT) */
/**
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 2ecf64c393..6e420ab051 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1917,7 +1917,7 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
#elif defined(__linux__) && defined(SYS_getrandom)
static int getrandom_works = 1; /* Be optimitic about our chances... */
- /* getrandom() isn't as straight foward as getentropy(), and has
+ /* getrandom() isn't as straightforward as getentropy(), and has
* no glibc wrapper.
*
* As far as I can tell from getrandom(2) and the source code, the
@@ -1930,7 +1930,7 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
*
* We optimistically assume that getrandom() is available and functional
* because it is the way of the future, and 2 branch mispredicts pale in
- * comparision to the overheads involved with failing to open
+ * comparison to the overheads involved with failing to open
* /dev/srandom followed by opening and reading from /dev/urandom.
*/
if (PREDICT_LIKELY(getrandom_works)) {
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index 26523e3126..a5a61cba1c 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -225,7 +225,7 @@ ed25519_public_key_is_zero(const ed25519_public_key_t *pubkey)
/* Return a heap-allocated array that contains <b>msg</b> prefixed by the
* string <b>prefix_str</b>. Set <b>final_msg_len_out</b> to the size of the
- * final array. If an error occured, return NULL. It's the resonsibility of the
+ * final array. If an error occurred, return NULL. It's the resonsibility of the
* caller to free the returned array. */
static uint8_t *
get_prefixed_msg(const uint8_t *msg, size_t msg_len,
@@ -259,7 +259,7 @@ get_prefixed_msg(const uint8_t *msg, size_t msg_len,
* Set <b>signature_out</b> to a signature of the <b>len</b>-byte message
* <b>msg</b>, using the secret and public key in <b>keypair</b>.
*
- * Return 0 if we successfuly signed the message, otherwise return -1.
+ * Return 0 if we successfully signed the message, otherwise return -1.
*/
int
ed25519_sign(ed25519_signature_t *signature_out,
@@ -529,7 +529,7 @@ ed25519_keypair_blind(ed25519_keypair_t *out,
/**
* Given an ed25519 public key in <b>inp</b>, generate a corresponding blinded
* public key in <b>out</b>, blinded with the 32-byte parameter in
- * <b>param</b>. Return 0 on sucess, -1 on railure.
+ * <b>param</b>. Return 0 on success, -1 on railure.
*/
int
ed25519_public_blind(ed25519_public_key_t *out,
@@ -719,7 +719,7 @@ ed25519_impl_spot_check,(void))
return -1;
/* XXX/yawning: Someone that's more paranoid than I am, can write "Assume
- * ref0 is cannonical, and fuzz impl against it" if they want, but I doubt
+ * ref0 is canonical, and fuzz impl against it" if they want, but I doubt
* that will catch anything that the known answer tests won't.
*/
goto end;
@@ -762,7 +762,7 @@ pick_ed25519_impl(void)
/* LCOV_EXCL_STOP */
}
-/* Initialize the Ed25519 implementation. This is neccessary if you're
+/* Initialize the Ed25519 implementation. This is necessary if you're
* going to use them in a multithreaded setting, and not otherwise. */
void
ed25519_init(void)
diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c
index 92b5978eaf..fa572580a4 100644
--- a/src/common/crypto_rsa.c
+++ b/src/common/crypto_rsa.c
@@ -852,7 +852,7 @@ crypto_pk_get_hashed_fingerprint(crypto_pk_t *pk, char *fp_out)
/** Given a crypto_pk_t <b>pk</b>, allocate a new buffer containing the
* Base64 encoding of the DER representation of the private key as a NUL
* terminated string, and return it via <b>priv_out</b>. Return 0 on
- * sucess, -1 on failure.
+ * success, -1 on failure.
*
* It is the caller's responsibility to sanitize and free the resulting buffer.
*/
diff --git a/src/common/timers.c b/src/common/timers.c
index 93cde7de5f..552080b11e 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -63,7 +63,7 @@ struct timeout_cb {
#define TIMEOUT_CB_OVERRIDE
/* We're going to support timers that are pretty far out in advance. Making
* this big can be inefficient, but having a significant number of timers
- * above TIMEOUT_MAX can also be super-inefficent. Choosing 5 here sets
+ * above TIMEOUT_MAX can also be super-inefficient. Choosing 5 here sets
* timeout_max to 2^30 ticks, or 29 hours with our value for USEC_PER_TICK */
#define WHEEL_NUM 5
#include "src/ext/timeouts/timeout.c"
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 86a876780a..bff59833ff 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1942,7 +1942,7 @@ tor_tls_handshake(tor_tls_t *tls)
return r;
}
-/** Perform the final part of the intial TLS handshake on <b>tls</b>. This
+/** Perform the final part of the initial TLS handshake on <b>tls</b>. This
* should be called for the first handshake only: it determines whether the v1
* or the v2 handshake was used, and adjusts things for the renegotiation
* handshake as appropriate.
diff --git a/src/common/util.c b/src/common/util.c
index 67e97811c6..90204befc0 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -3047,7 +3047,7 @@ unescape_string(const char *s, char **result, size_t *size_out)
/** Removes enclosing quotes from <b>path</b> and unescapes quotes between the
* enclosing quotes. Backslashes are not unescaped. Return the unquoted
- * <b>path</b> on sucess or 0 if <b>path</b> is not quoted correctly. */
+ * <b>path</b> on success or 0 if <b>path</b> is not quoted correctly. */
char *
get_unquoted_path(const char *path)
{
@@ -3898,7 +3898,7 @@ format_number_sigsafe(unsigned long x, char *buf, int buf_len,
* call it with a signed int and an unsigned char, and since the C standard
* does not guarantee that an int is wider than a char (an int must be at
* least 16 bits but it is permitted for a char to be that wide as well), we
- * can't assume a signed int is sufficient to accomodate an unsigned char.
+ * can't assume a signed int is sufficient to accommodate an unsigned char.
* Thus, format_helper_exit_status() will still need to emit any require '-'
* on its own.
*
@@ -3928,7 +3928,7 @@ format_dec_number_sigsafe(unsigned long x, char *buf, int buf_len)
*
* The format of <b>hex_errno</b> is: "CHILD_STATE/ERRNO\n", left-padded
* with spaces. CHILD_STATE indicates where
- * in the processs of starting the child process did the failure occur (see
+ * in the process of starting the child process did the failure occur (see
* CHILD_STATE_* macros for definition), and SAVED_ERRNO is the value of
* errno when the failure occurred.
*