aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/security/oauth2_utils.cc
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
commitbe82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch)
treecc5e1234073eb250a2c319b5a4db2919fce060ea /test/core/security/oauth2_utils.cc
parent194436342137924b4fb7429bede037a4b5ec7edb (diff)
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/security/oauth2_utils.cc')
-rw-r--r--test/core/security/oauth2_utils.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc
index 0d3a1279af..b18fa455fe 100644
--- a/test/core/security/oauth2_utils.cc
+++ b/test/core/security/oauth2_utils.cc
@@ -40,7 +40,7 @@ typedef struct {
} oauth2_request;
static void on_oauth2_response(void* arg, grpc_error* error) {
- oauth2_request* request = (oauth2_request*)arg;
+ oauth2_request* request = static_cast<oauth2_request*>(arg);
char* token = nullptr;
grpc_slice token_slice;
if (error != GRPC_ERROR_NONE) {
@@ -48,7 +48,7 @@ static void on_oauth2_response(void* arg, grpc_error* error) {
} else {
GPR_ASSERT(request->md_array.size == 1);
token_slice = GRPC_MDVALUE(request->md_array.md[0]);
- token = (char*)gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1);
+ token = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1));
memcpy(token, GRPC_SLICE_START_PTR(token_slice),
GRPC_SLICE_LENGTH(token_slice));
token[GRPC_SLICE_LENGTH(token_slice)] = '\0';
@@ -73,7 +73,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials(
grpc_closure do_nothing_closure;
grpc_auth_metadata_context null_ctx = {"", "", nullptr, nullptr};
- grpc_pollset* pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size());
+ grpc_pollset* pollset = static_cast<grpc_pollset*>(gpr_zalloc(grpc_pollset_size()));
grpc_pollset_init(pollset, &request.mu);
request.pops = grpc_polling_entity_create_from_pollset(pollset);
request.is_done = false;