summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-05 14:19:31 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 06:58:44 -0400
commit47573038736b96e2a353a25ed3c788dcb77d8fcb (patch)
tree20b95e3228fd153eead07944848c8cd62367d1ed /src/or/connection_or.c
parent1135405c8c6ea315cd035171770a6701edae57f0 (diff)
downloadtor-47573038736b96e2a353a25ed3c788dcb77d8fcb.tar.gz
tor-47573038736b96e2a353a25ed3c788dcb77d8fcb.zip
Fix all -Wshadow warnings on Linux
This is a partial fix for 18902.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index c69a2ad377..4f71a296cc 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -2275,14 +2275,13 @@ connection_or_send_certs_cell(or_connection_t *conn)
var_cell_t *cell;
size_t cell_len;
ssize_t pos;
- int server_mode;
tor_assert(conn->base_.state == OR_CONN_STATE_OR_HANDSHAKING_V3);
if (! conn->handshake_state)
return -1;
- server_mode = ! conn->handshake_state->started_here;
- if (tor_tls_get_my_certs(server_mode, &link_cert, &id_cert) < 0)
+ const int conn_in_server_mode = ! conn->handshake_state->started_here;
+ if (tor_tls_get_my_certs(conn_in_server_mode, &link_cert, &id_cert) < 0)
return -1;
tor_x509_cert_get_der(link_cert, &link_encoded, &link_len);
tor_x509_cert_get_der(id_cert, &id_encoded, &id_len);
@@ -2295,7 +2294,7 @@ connection_or_send_certs_cell(or_connection_t *conn)
cell->payload[0] = 2;
pos = 1;
- if (server_mode)
+ if (conn_in_server_mode)
cell->payload[pos] = OR_CERT_TYPE_TLS_LINK; /* Link cert */
else
cell->payload[pos] = OR_CERT_TYPE_AUTH_1024; /* client authentication */