diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-16 10:26:43 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-16 12:55:06 -0400 |
commit | 7ebfa607b238ed909473bb971d1187066d68c56f (patch) | |
tree | e94ab2e53a0c19164f60e43fc53bee7e85195ab0 /src/core/or/channeltls.c | |
parent | b3eb4091579e59e4bf311713a3bef0f85137b1b0 (diff) | |
download | tor-7ebfa607b238ed909473bb971d1187066d68c56f.tar.gz tor-7ebfa607b238ed909473bb971d1187066d68c56f.zip |
Use CONST_TO_* macros in more places.
This is an automated commit made with a python script.
After running the automated script, I had to hand-revert the cases where it
made the conversion functions call themselves.
Additionally, I had to edit a variable declaration in control_bootstrap.c so
that the result of a const cast could be put in a const field.
Diffstat (limited to 'src/core/or/channeltls.c')
-rw-r--r-- | src/core/or/channeltls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index 4a421462cc..90049a7e5c 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -538,7 +538,7 @@ static int channel_tls_get_remote_addr_method(const channel_t *chan, tor_addr_t *addr_out) { - const channel_tls_t *tlschan = BASE_CHAN_TO_TLS((channel_t*) chan); + const channel_tls_t *tlschan = CONST_BASE_CHAN_TO_TLS(chan); tor_assert(tlschan); tor_assert(addr_out); @@ -593,7 +593,7 @@ channel_tls_get_transport_name_method(channel_t *chan, char **transport_out) static const char * channel_tls_describe_peer_method(const channel_t *chan) { - const channel_tls_t *tlschan = BASE_CHAN_TO_TLS((channel_t*)chan); + const channel_tls_t *tlschan = CONST_BASE_CHAN_TO_TLS(chan); tor_assert(tlschan); if (tlschan->conn) { |