summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2018-12-13 17:18:49 -0600
committerTaylor Yu <catalyst@torproject.org>2018-12-20 17:54:49 -0600
commit308dde0c386158971a66c6e035b3f1ad67019eb5 (patch)
treecbe5652cf54945688e89d6268f6a05bd75160e87 /src/core
parente4109020e9b423a170e7ca14d04727bc3730dc67 (diff)
downloadtor-308dde0c386158971a66c6e035b3f1ad67019eb5.tar.gz
tor-308dde0c386158971a66c6e035b3f1ad67019eb5.zip
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.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/or/channeltls.c3
-rw-r--r--src/core/or/channeltls.h1
-rw-r--r--src/core/or/connection_or.c6
3 files changed, 1 insertions, 9 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c
index 8f407d5e15..cf33feec01 100644
--- a/src/core/or/channeltls.c
+++ b/src/core/or/channeltls.c
@@ -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);
diff --git a/src/core/or/channeltls.h b/src/core/or/channeltls.h
index 12715450b9..2ec7fe5453 100644
--- a/src/core/or/channeltls.h
+++ b/src/core/or/channeltls.h
@@ -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);
diff --git a/src/core/or/connection_or.c b/src/core/or/connection_or.c
index 962ec51c36..04ab4fe4a9 100644
--- a/src/core/or/connection_or.c
+++ b/src/core/or/connection_or.c
@@ -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