aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/iomgr/endpoint_tests.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-10 14:14:17 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-11-10 14:14:17 -0800
commit4ac2b8e585cbf7064f9bdde4eabaf8ff42801142 (patch)
tree5379629b43d287972916a87637a26251c1b0de5f /test/core/iomgr/endpoint_tests.cc
parente77b3c36d1b3e2033abd19d553748b678c22253f (diff)
Enable clang-tidy as a sanity check, fix up all known failures
Diffstat (limited to 'test/core/iomgr/endpoint_tests.cc')
-rw-r--r--test/core/iomgr/endpoint_tests.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc
index 8e859ba909..83aa23a60f 100644
--- a/test/core/iomgr/endpoint_tests.cc
+++ b/test/core/iomgr/endpoint_tests.cc
@@ -127,7 +127,7 @@ static void read_and_write_test_read_handler(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(g_mu);
state->read_done = 1 + (error == GRPC_ERROR_NONE);
GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, NULL));
+ grpc_pollset_kick(exec_ctx, g_pollset, nullptr));
gpr_mu_unlock(g_mu);
} else if (error == GRPC_ERROR_NONE) {
grpc_endpoint_read(exec_ctx, state->read_ep, &state->incoming,
@@ -139,7 +139,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx* exec_ctx,
void* data, grpc_error* error) {
struct read_and_write_test_state* state =
(struct read_and_write_test_state*)data;
- grpc_slice* slices = NULL;
+ grpc_slice* slices = nullptr;
size_t nslices;
if (error == GRPC_ERROR_NONE) {
@@ -164,7 +164,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx* exec_ctx,
gpr_mu_lock(g_mu);
state->write_done = 1 + (error == GRPC_ERROR_NONE);
GRPC_LOG_IF_ERROR("pollset_kick",
- grpc_pollset_kick(exec_ctx, g_pollset, NULL));
+ grpc_pollset_kick(exec_ctx, g_pollset, nullptr));
gpr_mu_unlock(g_mu);
}
@@ -237,7 +237,7 @@ static void read_and_write_test(grpc_endpoint_test_config config,
gpr_mu_lock(g_mu);
while (!state.read_done || !state.write_done) {
- grpc_pollset_worker* worker = NULL;
+ grpc_pollset_worker* worker = nullptr;
GPR_ASSERT(grpc_exec_ctx_now(&exec_ctx) < deadline);
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
@@ -259,7 +259,7 @@ static void inc_on_failure(grpc_exec_ctx* exec_ctx, void* arg,
gpr_mu_lock(g_mu);
*(int*)arg += (error != GRPC_ERROR_NONE);
GPR_ASSERT(
- GRPC_LOG_IF_ERROR("kick", grpc_pollset_kick(exec_ctx, g_pollset, NULL)));
+ GRPC_LOG_IF_ERROR("kick", grpc_pollset_kick(exec_ctx, g_pollset, nullptr)));
gpr_mu_unlock(g_mu);
}
@@ -271,7 +271,7 @@ static void wait_for_fail_count(grpc_exec_ctx* exec_ctx, int* fail_count,
grpc_timespec_to_millis_round_up(grpc_timeout_seconds_to_deadline(10));
while (grpc_exec_ctx_now(exec_ctx) < deadline &&
*fail_count < want_fail_count) {
- grpc_pollset_worker* worker = NULL;
+ grpc_pollset_worker* worker = nullptr;
GPR_ASSERT(GRPC_LOG_IF_ERROR(
"pollset_work",
grpc_pollset_work(exec_ctx, g_pollset, &worker, deadline)));
@@ -332,6 +332,6 @@ void grpc_endpoint_tests(grpc_endpoint_test_config config,
for (i = 1; i < 1000; i = GPR_MAX(i + 1, i * 5 / 4)) {
read_and_write_test(config, 40320, i, i, false);
}
- g_pollset = NULL;
- g_mu = NULL;
+ g_pollset = nullptr;
+ g_mu = nullptr;
}