mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Remove unused old_state var in connection_or.c
connection_or_change_state() saved an old_state to pass to channel_tls_handle_state_change_on_orconn(), which promptly cast it to void. Remove this unused variable and parameter.
This commit is contained in:
parent
e4109020e9
commit
308dde0c38
@ -950,7 +950,6 @@ channel_tls_listener_describe_transport_method(channel_listener_t *chan_l)
|
||||
void
|
||||
channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
|
||||
or_connection_t *conn,
|
||||
uint8_t old_state,
|
||||
uint8_t state)
|
||||
{
|
||||
channel_t *base_chan;
|
||||
@ -959,8 +958,6 @@ channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
|
||||
tor_assert(conn);
|
||||
tor_assert(conn->chan == chan);
|
||||
tor_assert(chan->conn == conn);
|
||||
/* Shut the compiler up without triggering -Wtautological-compare */
|
||||
(void)old_state;
|
||||
|
||||
base_chan = TLS_CHAN_TO_BASE(chan);
|
||||
|
||||
|
@ -49,7 +49,6 @@ channel_tls_t * channel_tls_from_base(channel_t *chan);
|
||||
void channel_tls_handle_cell(cell_t *cell, or_connection_t *conn);
|
||||
void channel_tls_handle_state_change_on_orconn(channel_tls_t *chan,
|
||||
or_connection_t *conn,
|
||||
uint8_t old_state,
|
||||
uint8_t state);
|
||||
void channel_tls_handle_var_cell(var_cell_t *var_cell,
|
||||
or_connection_t *conn);
|
||||
|
@ -408,16 +408,12 @@ connection_or_report_broken_states(int severity, int domain)
|
||||
static void
|
||||
connection_or_change_state(or_connection_t *conn, uint8_t state)
|
||||
{
|
||||
uint8_t old_state;
|
||||
|
||||
tor_assert(conn);
|
||||
|
||||
old_state = conn->base_.state;
|
||||
conn->base_.state = state;
|
||||
|
||||
if (conn->chan)
|
||||
channel_tls_handle_state_change_on_orconn(conn->chan, conn,
|
||||
old_state, state);
|
||||
channel_tls_handle_state_change_on_orconn(conn->chan, conn, state);
|
||||
}
|
||||
|
||||
/** Return the number of circuits using an or_connection_t; this used to
|
||||
|
Loading…
Reference in New Issue
Block a user