From 4a0cd79588d2a472ab81e4f1d0e1e1bf6f2b390c Mon Sep 17 00:00:00 2001 From: Samanta Navarro Date: Wed, 11 Nov 2020 11:38:19 +0000 Subject: 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) --- 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 +++--- 132 files changed, 249 insertions(+), 246 deletions(-) (limited to 'src') 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 * subdir. 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 now. + * Change the time at which "user activity" was last seen to now. * * 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: *