From 4ac2b8e585cbf7064f9bdde4eabaf8ff42801142 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Nov 2017 14:14:17 -0800 Subject: Enable clang-tidy as a sanity check, fix up all known failures --- test/core/network_benchmarks/low_level_ping_pong.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/core/network_benchmarks') diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc index 722652148c..687395d916 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.cc +++ b/test/core/network_benchmarks/low_level_ping_pong.cc @@ -405,7 +405,7 @@ error: } static int accept_server(int listen_fd) { - int fd = accept(listen_fd, NULL, NULL); + int fd = accept(listen_fd, nullptr, nullptr); if (fd < 0) { gpr_log(GPR_ERROR, "Accept failed: %s", strerror(errno)); return -1; @@ -583,7 +583,7 @@ static int run_benchmark(const char* socket_type, thread_args* client_args, gpr_log(GPR_INFO, "Starting test %s %s %zu", client_args->strategy_name, socket_type, client_args->msg_size); - gpr_thd_new(&tid, server_thread_wrap, server_args, NULL); + gpr_thd_new(&tid, server_thread_wrap, server_args, nullptr); client_thread(client_args); return 0; } @@ -626,10 +626,10 @@ int main(int argc, char** argv) { thread_args* server_args = static_cast(gpr_malloc(sizeof(thread_args))); int msg_size = -1; - const char* read_strategy = NULL; - const char* socket_type = NULL; + const char* read_strategy = nullptr; + const char* socket_type = nullptr; size_t i; - const test_strategy* strategy = NULL; + const test_strategy* strategy = nullptr; int error = 0; gpr_cmdline* cmdline = @@ -647,12 +647,12 @@ int main(int argc, char** argv) { msg_size = 50; } - if (read_strategy == NULL) { + if (read_strategy == nullptr) { gpr_log(GPR_INFO, "No strategy specified, running all benchmarks"); return run_all_benchmarks((size_t)msg_size); } - if (socket_type == NULL) { + if (socket_type == nullptr) { socket_type = "tcp"; } if (msg_size <= 0) { @@ -666,7 +666,7 @@ int main(int argc, char** argv) { strategy = &test_strategies[i]; } } - if (strategy == NULL) { + if (strategy == nullptr) { fprintf(stderr, "Invalid read strategy %s\n", read_strategy); return -1; } -- cgit v1.2.3