aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/tsi/transport_security_test_lib.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/tsi/transport_security_test_lib.cc')
-rw-r--r--test/core/tsi/transport_security_test_lib.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/core/tsi/transport_security_test_lib.cc b/test/core/tsi/transport_security_test_lib.cc
index 3537366de9..ef3b6307db 100644
--- a/test/core/tsi/transport_security_test_lib.cc
+++ b/test/core/tsi/transport_security_test_lib.cc
@@ -144,7 +144,7 @@ static void maybe_append_unused_bytes(handshaker_args* args) {
tsi_test_fixture* fixture = args->fixture;
if (fixture->test_unused_bytes && !args->appended_unused_bytes) {
args->appended_unused_bytes = true;
- send_bytes_to_peer(fixture, (const unsigned char*)TSI_TEST_UNUSED_BYTES,
+ send_bytes_to_peer(fixture, reinterpret_cast<const unsigned char*>(TSI_TEST_UNUSED_BYTES),
strlen(TSI_TEST_UNUSED_BYTES), args->is_client);
if (fixture->client_result != nullptr &&
fixture->server_result == nullptr) {
@@ -288,7 +288,7 @@ grpc_error* on_handshake_next_done(tsi_result result, void* user_data,
const unsigned char* bytes_to_send,
size_t bytes_to_send_size,
tsi_handshaker_result* handshaker_result) {
- handshaker_args* args = (handshaker_args*)user_data;
+ handshaker_args* args = static_cast<handshaker_args*>(user_data);
GPR_ASSERT(args != nullptr);
GPR_ASSERT(args->fixture != nullptr);
tsi_test_fixture* fixture = args->fixture;
@@ -327,7 +327,7 @@ grpc_error* on_handshake_next_done(tsi_result result, void* user_data,
static void on_handshake_next_done_wrapper(
tsi_result result, void* user_data, const unsigned char* bytes_to_send,
size_t bytes_to_send_size, tsi_handshaker_result* handshaker_result) {
- handshaker_args* args = (handshaker_args*)user_data;
+ handshaker_args* args = static_cast<handshaker_args*>(user_data);
args->error = on_handshake_next_done(result, user_data, bytes_to_send,
bytes_to_send_size, handshaker_result);
}
@@ -471,7 +471,7 @@ static unsigned char* generate_random_message(size_t size) {
unsigned char* output =
static_cast<unsigned char*>(gpr_zalloc(sizeof(unsigned char) * size));
for (i = 0; i < size - 1; ++i) {
- output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
+ output[i] = chars[rand() % static_cast<int>(sizeof(chars) - 1)];
}
return output;
}