aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-16 09:57:52 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-16 09:57:52 -0400
commitb0d7b100886ef14a785f6ca1de968df9a884d0a7 (patch)
tree931f94cbc9dd273a6df31ef3e93623babfc1ec2b /src/core/mainloop
parent10d8555e7db2f4835b4fc9a0f4592e470a974c5f (diff)
downloadtor-b0d7b100886ef14a785f6ca1de968df9a884d0a7.tar.gz
tor-b0d7b100886ef14a785f6ca1de968df9a884d0a7.zip
Improve documentation for our TO_*_CONN() cast functions.
Preliminary work for #40046.
Diffstat (limited to 'src/core/mainloop')
-rw-r--r--src/core/mainloop/connection.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 282d90c2b0..216aeb68d1 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -220,8 +220,12 @@ static smartlist_t *outgoing_addrs = NULL;
/**************************************************************/
-/** Convert a connection_t* to an listener_connection_t*; assert if the cast
- * is invalid. */
+/**
+ * Cast a `connection_t *` to a `listener_connection_t *`.
+ *
+ * Exit with an assertion failure if the input is not a
+ * `listener_connection_t`.
+ **/
listener_connection_t *
TO_LISTENER_CONN(connection_t *c)
{