diff --git a/src/or/connection.c b/src/or/connection.c
index b31b99c2e7..4e39832709 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1708,10 +1708,13 @@ connection_connect_sockaddr(connection_t *conn,
}
/** Take conn, make a nonblocking socket; try to connect to
- * addr:port (they arrive in *host order*). If fail, return -1 and if
+ * addr:port (port arrives in *host order*). If fail, return -1 and if
* applicable put your best guess about errno into *socket_error.
* Else assign s to conn-\>s: if connected return 1, if EAGAIN return 0.
*
+ * addr:port can be different to conn->addr:conn->port if connecting through
+ * a proxy.
+ *
* address is used to make the logs useful.
*
* On success, add conn to the list of polled connections.
@@ -4212,7 +4215,8 @@ connection_write_to_buf_impl_,(const char *string, size_t len,
}
/** Return a connection with given type, address, port, and purpose;
- * or NULL if no such connection exists. */
+ * or NULL if no such connection exists (or if all such connections are marked
+ * for close). */
connection_t *
connection_get_by_type_addr_port_purpose(int type,
const tor_addr_t *addr, uint16_t port,
diff --git a/src/or/main.c b/src/or/main.c
index 1469fd1da1..3f166c819d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -500,8 +500,7 @@ connection_in_array(connection_t *conn)
return smartlist_contains(connection_array, conn);
}
-/** Set *array to an array of all connections, and *n
- * to the length of the array. *array and *n must not
+/** Set *array to an array of all connections. *array must not
* be modified.
*/
smartlist_t *
diff --git a/src/or/router.c b/src/or/router.c
index 90203458b2..bed9dc5e43 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1781,9 +1781,9 @@ router_get_my_descriptor(void)
const char *body;
if (!router_get_my_routerinfo())
return NULL;
- /* Make sure this is nul-terminated. */
tor_assert(desc_routerinfo->cache_info.saved_location == SAVED_NOWHERE);
body = signed_descriptor_get_body(&desc_routerinfo->cache_info);
+ /* Make sure this is nul-terminated. */
tor_assert(!body[desc_routerinfo->cache_info.signed_descriptor_len]);
log_debug(LD_GENERAL,"my desc is '%s'", body);
return body;