aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/network_benchmarks
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/network_benchmarks
parente77b3c36d1b3e2033abd19d553748b678c22253f (diff)
Enable clang-tidy as a sanity check, fix up all known failures
Diffstat (limited to 'test/core/network_benchmarks')
-rw-r--r--test/core/network_benchmarks/low_level_ping_pong.cc16
1 files changed, 8 insertions, 8 deletions
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<thread_args*>(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;
}