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/feature/control | |
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/feature/control')
-rw-r--r-- | src/feature/control/control_bootstrap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/feature/control/control_bootstrap.c b/src/feature/control/control_bootstrap.c index fee7612ba2..d4f2adde81 100644 --- a/src/feature/control/control_bootstrap.c +++ b/src/feature/control/control_bootstrap.c @@ -274,7 +274,7 @@ control_event_bootstrap_problem(const char *warn, const char *reason, const char *recommendation = "ignore"; int severity; char *or_id = NULL, *hostaddr = NULL; - or_connection_t *or_conn = NULL; + const or_connection_t *or_conn = NULL; /* bootstrap_percent must not be in "undefined" state here. */ tor_assert(status >= 0); @@ -301,7 +301,7 @@ control_event_bootstrap_problem(const char *warn, const char *reason, if (conn && conn->type == CONN_TYPE_OR) { /* XXX TO_OR_CONN can't deal with const */ - or_conn = TO_OR_CONN((connection_t *)conn); + or_conn = CONST_TO_OR_CONN(conn); or_id = tor_strdup(hex_str(or_conn->identity_digest, DIGEST_LEN)); } else { or_id = tor_strdup("?"); |