diff options
author | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
---|---|---|
committer | Noah Eisen <ncteisen@google.com> | 2018-02-09 09:16:55 -0800 |
commit | be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch) | |
tree | cc5e1234073eb250a2c319b5a4db2919fce060ea /src/core/ext/filters/client_channel/http_connect_handshaker.cc | |
parent | 194436342137924b4fb7429bede037a4b5ec7edb (diff) |
Autofix c casts to c++ casts
Diffstat (limited to 'src/core/ext/filters/client_channel/http_connect_handshaker.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/http_connect_handshaker.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 6bfd038887..b4684a81dc 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -119,7 +119,7 @@ static void handshake_failed_locked(http_connect_handshaker* handshaker, // Callback invoked when finished writing HTTP CONNECT request. static void on_write_done(void* arg, grpc_error* error) { - http_connect_handshaker* handshaker = (http_connect_handshaker*)arg; + http_connect_handshaker* handshaker = static_cast<http_connect_handshaker*>(arg); gpr_mu_lock(&handshaker->mu); if (error != GRPC_ERROR_NONE || handshaker->shutdown) { // If the write failed or we're shutting down, clean up and invoke the @@ -139,7 +139,7 @@ static void on_write_done(void* arg, grpc_error* error) { // Callback invoked for reading HTTP CONNECT response. static void on_read_done(void* arg, grpc_error* error) { - http_connect_handshaker* handshaker = (http_connect_handshaker*)arg; + http_connect_handshaker* handshaker = static_cast<http_connect_handshaker*>(arg); gpr_mu_lock(&handshaker->mu); if (error != GRPC_ERROR_NONE || handshaker->shutdown) { // If the read failed or we're shutting down, clean up and invoke the @@ -224,13 +224,13 @@ done: // static void http_connect_handshaker_destroy(grpc_handshaker* handshaker_in) { - http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; + http_connect_handshaker* handshaker = reinterpret_cast<http_connect_handshaker*>(handshaker_in); http_connect_handshaker_unref(handshaker); } static void http_connect_handshaker_shutdown(grpc_handshaker* handshaker_in, grpc_error* why) { - http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; + http_connect_handshaker* handshaker = reinterpret_cast<http_connect_handshaker*>(handshaker_in); gpr_mu_lock(&handshaker->mu); if (!handshaker->shutdown) { handshaker->shutdown = true; @@ -244,7 +244,7 @@ static void http_connect_handshaker_shutdown(grpc_handshaker* handshaker_in, static void http_connect_handshaker_do_handshake( grpc_handshaker* handshaker_in, grpc_tcp_server_acceptor* acceptor, grpc_closure* on_handshake_done, grpc_handshaker_args* args) { - http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; + http_connect_handshaker* handshaker = reinterpret_cast<http_connect_handshaker*>(handshaker_in); // Check for HTTP CONNECT channel arg. // If not found, invoke on_handshake_done without doing anything. const grpc_arg* arg = @@ -270,8 +270,8 @@ static void http_connect_handshaker_do_handshake( GPR_ASSERT(arg->type == GRPC_ARG_STRING); gpr_string_split(arg->value.string, "\n", &header_strings, &num_header_strings); - headers = (grpc_http_header*)gpr_malloc(sizeof(grpc_http_header) * - num_header_strings); + headers = static_cast<grpc_http_header*>(gpr_malloc(sizeof(grpc_http_header) * + num_header_strings)); for (size_t i = 0; i < num_header_strings; ++i) { char* sep = strchr(header_strings[i], ':'); if (sep == nullptr) { @@ -324,7 +324,7 @@ static const grpc_handshaker_vtable http_connect_handshaker_vtable = { static grpc_handshaker* grpc_http_connect_handshaker_create() { http_connect_handshaker* handshaker = - (http_connect_handshaker*)gpr_malloc(sizeof(*handshaker)); + static_cast<http_connect_handshaker*>(gpr_malloc(sizeof(*handshaker))); memset(handshaker, 0, sizeof(*handshaker)); grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); gpr_mu_init(&handshaker->mu); |