aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
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/cpp/qps
parente77b3c36d1b3e2033abd19d553748b678c22253f (diff)
Enable clang-tidy as a sanity check, fix up all known failures
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/json_run_localhost.cc6
-rw-r--r--test/cpp/qps/qps_json_driver.cc2
-rw-r--r--test/cpp/qps/server_async.cc2
-rw-r--r--test/cpp/qps/server_sync.cc2
4 files changed, 6 insertions, 6 deletions
diff --git a/test/cpp/qps/json_run_localhost.cc b/test/cpp/qps/json_run_localhost.cc
index 4b788eae73..db8b2a3943 100644
--- a/test/cpp/qps/json_run_localhost.cc
+++ b/test/cpp/qps/json_run_localhost.cc
@@ -46,7 +46,7 @@ std::string as_string(const T& val) {
static void sighandler(int sig) {
const int errno_saved = errno;
- if (g_driver != NULL) g_driver->Interrupt();
+ if (g_driver != nullptr) g_driver->Interrupt();
for (int i = 0; i < kNumWorkers; ++i) {
if (g_workers[i]) g_workers[i]->Interrupt();
}
@@ -58,8 +58,8 @@ static void register_sighandler() {
memset(&act, 0, sizeof(act));
act.sa_handler = sighandler;
- sigaction(SIGINT, &act, NULL);
- sigaction(SIGTERM, &act, NULL);
+ sigaction(SIGINT, &act, nullptr);
+ sigaction(SIGTERM, &act, nullptr);
}
static void LogStatus(int status, const char* label) {
diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc
index 1672527426..b2449da69c 100644
--- a/test/cpp/qps/qps_json_driver.cc
+++ b/test/cpp/qps/qps_json_driver.cc
@@ -181,7 +181,7 @@ static bool QpsDriver() {
if (scfile) {
// Read the json data from disk
FILE* json_file = fopen(FLAGS_scenarios_file.c_str(), "r");
- GPR_ASSERT(json_file != NULL);
+ GPR_ASSERT(json_file != nullptr);
fseek(json_file, 0, SEEK_END);
long len = ftell(json_file);
char* data = new char[len];
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 23c7e85283..72ae772147 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -79,7 +79,7 @@ class AsyncQpsServerTest final : public grpc::testing::Server {
auto port_num = port();
// Negative port number means inproc server, so no listen port needed
if (port_num >= 0) {
- char* server_address = NULL;
+ char* server_address = nullptr;
gpr_join_host_port(&server_address, "::", port_num);
builder.AddListeningPort(server_address,
Server::CreateServerCredentials(config));
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index 4ef57bd08b..ea89a30e2e 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -159,7 +159,7 @@ class SynchronousServer final : public grpc::testing::Server {
auto port_num = port();
// Negative port number means inproc server, so no listen port needed
if (port_num >= 0) {
- char* server_address = NULL;
+ char* server_address = nullptr;
gpr_join_host_port(&server_address, "::", port_num);
builder.AddListeningPort(server_address,
Server::CreateServerCredentials(config));