[tor-commits] [tor/master] fix typos, whitespace, comments

arma at torproject.org arma at torproject.org
Thu May 16 03:20:19 UTC 2019


commit d86896b29c7a5278bedd89a7150ddbe7531b365b
Author: Roger Dingledine <arma at torproject.org>
Date:   Wed May 15 23:20:03 2019 -0400

    fix typos, whitespace, comments
---
 src/core/include.am                       | 22 +++++++++++-----------
 src/core/or/connection_edge.c             |  4 ++--
 src/core/or/relay.c                       |  6 +++---
 src/core/or/sendme.c                      | 18 +++++++++---------
 src/feature/dirauth/shared_random_state.c |  2 +-
 src/feature/hs/hs_client.c                |  2 +-
 src/feature/hs/hs_common.c                |  6 +++---
 src/feature/hs/hs_service.c               |  2 +-
 src/trunnel/include.am                    |  2 +-
 9 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/core/include.am b/src/core/include.am
index b04c5db54..f722b7048 100644
--- a/src/core/include.am
+++ b/src/core/include.am
@@ -47,7 +47,7 @@ LIBTOR_APP_A_SOURCES = 				\
 	src/core/or/onion.c			\
 	src/core/or/ocirc_event.c		\
 	src/core/or/or_periodic.c		\
-	src/core/or/or_sys.c		\
+	src/core/or/or_sys.c			\
 	src/core/or/orconn_event.c		\
 	src/core/or/policies.c			\
 	src/core/or/protover.c			\
@@ -140,7 +140,7 @@ LIBTOR_APP_A_SOURCES = 				\
 	src/feature/relay/dns.c			\
 	src/feature/relay/ext_orport.c		\
 	src/feature/relay/onion_queue.c		\
-	src/feature/relay/relay_periodic.c		\
+	src/feature/relay/relay_periodic.c	\
 	src/feature/relay/relay_sys.c		\
 	src/feature/relay/router.c		\
 	src/feature/relay/routerkeys.c		\
@@ -171,7 +171,7 @@ LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
 # The Directory Authority module.
 MODULE_DIRAUTH_SOURCES = 					\
 	src/feature/dirauth/authmode.c				\
-        src/feature/dirauth/bridgeauth.c                        \
+	src/feature/dirauth/bridgeauth.c			\
 	src/feature/dirauth/bwauth.c				\
 	src/feature/dirauth/dirauth_periodic.c			\
 	src/feature/dirauth/dirauth_sys.c			\
@@ -252,14 +252,14 @@ noinst_HEADERS +=					\
 	src/core/or/connection_edge.h			\
 	src/core/or/connection_or.h			\
 	src/core/or/connection_st.h			\
-	src/core/or/crypt_path.h      		\
+	src/core/or/crypt_path.h			\
 	src/core/or/cpath_build_state_st.h		\
 	src/core/or/crypt_path_reference_st.h		\
 	src/core/or/crypt_path_st.h			\
 	src/core/or/destroy_cell_queue_st.h		\
 	src/core/or/dos.h				\
 	src/core/or/edge_connection_st.h		\
-	src/core/or/half_edge_st.h		\
+	src/core/or/half_edge_st.h			\
 	src/core/or/entry_connection_st.h		\
 	src/core/or/entry_port_cfg_st.h			\
 	src/core/or/extend_info_st.h			\
@@ -267,7 +267,7 @@ noinst_HEADERS +=					\
 	src/core/or/onion.h				\
 	src/core/or/or.h				\
 	src/core/or/or_periodic.h			\
-	src/core/or/or_sys.h			\
+	src/core/or/or_sys.h				\
 	src/core/or/orconn_event.h			\
 	src/core/or/orconn_event_sys.h			\
 	src/core/or/or_circuit_st.h			\
@@ -313,14 +313,14 @@ noinst_HEADERS +=					\
 	src/feature/control/control_cmd.h		\
 	src/feature/control/control_cmd_args_st.h	\
 	src/feature/control/control_connection_st.h	\
-	src/feature/control/control_events.h	        \
+	src/feature/control/control_events.h		\
 	src/feature/control/control_fmt.h		\
 	src/feature/control/control_getinfo.h		\
 	src/feature/control/control_proto.h		\
 	src/feature/control/fmt_serverstatus.h		\
 	src/feature/control/getinfo_geoip.h		\
 	src/feature/dirauth/authmode.h			\
-        src/feature/dirauth/bridgeauth.h                \
+        src/feature/dirauth/bridgeauth.h		\
 	src/feature/dirauth/bwauth.h			\
 	src/feature/dirauth/dirauth_periodic.h		\
 	src/feature/dirauth/dirauth_sys.h		\
@@ -395,8 +395,8 @@ noinst_HEADERS +=					\
 	src/feature/nodelist/networkstatus_voter_info_st.h	\
 	src/feature/nodelist/nickname.h			\
 	src/feature/nodelist/node_st.h			\
-	src/feature/nodelist/nodefamily.h	        \
-	src/feature/nodelist/nodefamily_st.h    	\
+	src/feature/nodelist/nodefamily.h		\
+	src/feature/nodelist/nodefamily_st.h		\
 	src/feature/nodelist/nodelist.h			\
 	src/feature/nodelist/node_select.h		\
 	src/feature/nodelist/routerinfo.h		\
@@ -413,7 +413,7 @@ noinst_HEADERS +=					\
 	src/feature/relay/dns_structs.h			\
 	src/feature/relay/ext_orport.h			\
 	src/feature/relay/onion_queue.h			\
-	src/feature/relay/relay_periodic.h			\
+	src/feature/relay/relay_periodic.h		\
 	src/feature/relay/relay_sys.h			\
 	src/feature/relay/router.h			\
 	src/feature/relay/routerkeys.h			\
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 8ed403456..c08d2a9ff 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -2816,7 +2816,7 @@ static const char HTTP_CONNECT_IS_NOT_AN_HTTP_PROXY_MSG[] =
   "Content-Type: text/html; charset=iso-8859-1\r\n\r\n"
   "<html>\n"
   "<head>\n"
-  "<title>This is an HTTP CONNECT tunnel, not an full HTTP Proxy</title>\n"
+  "<title>This is an HTTP CONNECT tunnel, not a full HTTP Proxy</title>\n"
   "</head>\n"
   "<body>\n"
   "<h1>This is an HTTP CONNECT tunnel, not an HTTP proxy.</h1>\n"
@@ -2826,7 +2826,7 @@ static const char HTTP_CONNECT_IS_NOT_AN_HTTP_PROXY_MSG[] =
   "</p><p>\n"
   "This is not correct: This port is configured as a CONNECT tunnel, not\n"
   "an HTTP proxy. Please configure your client accordingly.  You can also\n"
-  "use HTTPS, then the client should automatically use HTTP CONNECT."
+  "use HTTPS; then the client should automatically use HTTP CONNECT."
   "</p>\n"
   "<p>\n"
   "See <a href=\"https://www.torproject.org/documentation.html\">"
diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 8b3a1be18..066ef19db 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -543,7 +543,7 @@ relay_command_to_string(uint8_t command)
 STATIC size_t
 get_pad_cell_offset(size_t data_len)
 {
-  /* This is never suppose to happen but in case it does, stop right away
+  /* This is never supposed to happen but in case it does, stop right away
    * because if tor is tricked somehow into not adding random bytes to the
    * payload with this function returning 0 for a bad data_len, the entire
    * authenticated SENDME design can be bypassed leading to bad denial of
@@ -577,7 +577,7 @@ pad_cell_payload(uint8_t *cell_payload, size_t data_len)
   }
 
   /* Remember here that the cell_payload is the length of the header and
-   * payload size so we offset it using the full lenght of the cell. */
+   * payload size so we offset it using the full length of the cell. */
   pad_len = CELL_PAYLOAD_SIZE - pad_offset;
   crypto_fast_rng_getbytes(get_thread_fast_rng(),
                            cell_payload + pad_offset, pad_len);
@@ -1621,7 +1621,7 @@ connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ,
     }
   }
 
-  /* Tell circpad that we've recieved a recognized cell */
+  /* Tell circpad that we've received a recognized cell */
   circpad_deliver_recognized_relay_cell_events(circ, rh.command, layer_hint);
 
   /* either conn is NULL, in which case we've got a control cell, or else
diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c
index e7c65d99e..0743c48c3 100644
--- a/src/core/or/sendme.c
+++ b/src/core/or/sendme.c
@@ -157,7 +157,7 @@ cell_version_is_valid(uint8_t cell_version)
  *
  * This is the main critical function to make sure we can continue to
  * send/recv cells on a circuit. If the SENDME is invalid, the circuit should
- * be mark for close. */
+ * be marked for close by the caller. */
 STATIC bool
 sendme_is_valid(const circuit_t *circ, const uint8_t *cell_payload,
                 size_t cell_payload_len)
@@ -396,11 +396,11 @@ sendme_circuit_consider_sending(circuit_t *circ, crypt_path_t *layer_hint)
  * the length of the SENDME cell payload (excluding the header). The
  * cell_payload is the payload.
  *
- * Return 0 on success that is the SENDME is valid and the package window has
- * been updated properly.
+ * Return 0 on success (the SENDME is valid and the package window has
+ * been updated properly).
  *
- * On error, a negative value is returned which indicate that the circuit must
- * be closed using the value as the reason for it. */
+ * On error, a negative value is returned, which indicates that the
+ * circuit must be closed using the value as the reason for it. */
 int
 sendme_process_circuit_level(crypt_path_t *layer_hint,
                              circuit_t *circ, const uint8_t *cell_payload,
@@ -462,11 +462,11 @@ sendme_process_circuit_level(crypt_path_t *layer_hint,
  * edge connection (stream) that the circuit circ is associated with. The
  * cell_body_len is the length of the payload (excluding the header).
  *
- * Return 0 on success that is the SENDME is valid and the package window has
- * been updated properly.
+ * Return 0 on success (the SENDME is valid and the package window has
+ * been updated properly).
  *
- * On error, a negative value is returned which indicate that the circuit must
- * be closed using the value as the reason for it. */
+ * On error, a negative value is returned, which indicates that the
+ * circuit must be closed using the value as the reason for it. */
 int
 sendme_process_stream_level(edge_connection_t *conn, circuit_t *circ,
                             uint16_t cell_body_len)
diff --git a/src/feature/dirauth/shared_random_state.c b/src/feature/dirauth/shared_random_state.c
index 9a045b283..b669e3836 100644
--- a/src/feature/dirauth/shared_random_state.c
+++ b/src/feature/dirauth/shared_random_state.c
@@ -937,7 +937,7 @@ state_query_del_all_(sr_state_object_t obj_type)
     } DIGESTMAP_FOREACH_END;
     break;
   }
-  /* The following object are _NOT_ suppose to be removed. */
+  /* The following objects are _NOT_ supposed to be removed. */
   case SR_STATE_OBJ_CURSRV:
   case SR_STATE_OBJ_PREVSRV:
   case SR_STATE_OBJ_PHASE:
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index 7aec6d80b..ad5bf1556 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -697,7 +697,7 @@ setup_intro_circ_auth_key(origin_circuit_t *circ)
   }
 
   /* Reaching this point means we didn't find any intro point for this circuit
-   * which is not suppose to happen. */
+   * which is not supposed to happen. */
   tor_assert_nonfatal_unreached();
 
  end:
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index 597409a1e..a5747fe17 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -941,7 +941,7 @@ hs_parse_address(const char *address, ed25519_public_key_t *key_out,
   return -1;
 }
 
-/* Validate a given onion address. The length, the base32 decoding and
+/* Validate a given onion address. The length, the base32 decoding, and
  * checksum are validated. Return 1 if valid else 0. */
 int
 hs_address_is_valid(const char *address)
@@ -956,7 +956,7 @@ hs_address_is_valid(const char *address)
     goto invalid;
   }
 
-  /* Get the checksum it's suppose to be and compare it with what we have
+  /* Get the checksum it's supposed to be and compare it with what we have
    * encoded in the address. */
   build_hs_checksum(&service_pubkey, version, target_checksum);
   if (tor_memcmp(checksum, target_checksum, sizeof(checksum))) {
@@ -984,7 +984,7 @@ hs_address_is_valid(const char *address)
  * The returned address is base32 encoded and put in addr_out. The caller MUST
  * make sure the addr_out is at least HS_SERVICE_ADDR_LEN_BASE32 + 1 long.
  *
- * Format is as follow:
+ * Format is as follows:
  *     base32(PUBKEY || CHECKSUM || VERSION)
  *     CHECKSUM = H(".onion checksum" || PUBKEY || VERSION)
  * */
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 76e55e4f8..8a4f1efb1 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -1231,7 +1231,7 @@ load_client_keys(hs_service_t *service)
     client_key_str = read_file_to_str(client_key_file_path, 0, NULL);
 
     /* If we cannot read the file, continue with the next file. */
-    if (!client_key_str)  {
+    if (!client_key_str) {
       log_warn(LD_REND, "Client authorization file %s can't be read. "
                         "Corrupted or verify permission? Ignoring.",
                client_key_file_path);
diff --git a/src/trunnel/include.am b/src/trunnel/include.am
index 82e7a6695..ce15570b1 100644
--- a/src/trunnel/include.am
+++ b/src/trunnel/include.am
@@ -11,7 +11,7 @@ TRUNNELINPUTS = \
 	src/trunnel/link_handshake.trunnel \
 	src/trunnel/pwbox.trunnel \
 	src/trunnel/channelpadding_negotiation.trunnel \
-	src/trunnel/sendme.trunnelĀ \
+	src/trunnel/sendme.trunnel \
 	src/trunnel/socks5.trunnel \
 	src/trunnel/circpad_negotiation.trunnel
 



More information about the tor-commits mailing list