diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-16 19:31:28 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-16 19:31:28 -0800 |
commit | 177039b2f89e73ad0d048da021f939f3a153c4e2 (patch) | |
tree | c7f10f04cd9a0872863e2b181162bc9928160cd8 /src/core/ext/filters/client_channel/backup_poller.cc | |
parent | 995aa91bbbc68deb6dfd7c667cfee3af2bedec08 (diff) | |
parent | 82c8f945302f128495e261b853ac49f1dfbe69a1 (diff) |
Merge master
Diffstat (limited to 'src/core/ext/filters/client_channel/backup_poller.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/backup_poller.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/ext/filters/client_channel/backup_poller.cc b/src/core/ext/filters/client_channel/backup_poller.cc index ea9fb2cae1..339a79b0fb 100644 --- a/src/core/ext/filters/client_channel/backup_poller.cc +++ b/src/core/ext/filters/client_channel/backup_poller.cc @@ -46,7 +46,7 @@ typedef struct backup_poller { static gpr_once g_once = GPR_ONCE_INIT; static gpr_mu g_poller_mu; -static backup_poller* g_poller = NULL; // guarded by g_poller_mu +static backup_poller* g_poller = nullptr; // guarded by g_poller_mu // g_poll_interval_ms is set only once at the first time // grpc_client_channel_start_backup_polling() is called, after that it is // treated as const. @@ -55,7 +55,7 @@ static int g_poll_interval_ms = DEFAULT_POLL_INTERVAL_MS; static void init_globals() { gpr_mu_init(&g_poller_mu); char* env = gpr_getenv("GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS"); - if (env != NULL) { + if (env != nullptr) { int poll_interval_ms = gpr_parse_nonnegative_int(env); if (poll_interval_ms == -1) { gpr_log(GPR_ERROR, @@ -85,7 +85,7 @@ static void g_poller_unref() { if (gpr_unref(&g_poller->refs)) { gpr_mu_lock(&g_poller_mu); backup_poller* p = g_poller; - g_poller = NULL; + g_poller = nullptr; gpr_mu_unlock(&g_poller_mu); gpr_mu_lock(p->pollset_mu); p->shutting_down = true; @@ -113,7 +113,7 @@ static void run_poller(void* arg, grpc_error* error) { return; } grpc_error* err = - grpc_pollset_work(p->pollset, NULL, grpc_core::ExecCtx::Get()->Now()); + grpc_pollset_work(p->pollset, nullptr, grpc_core::ExecCtx::Get()->Now()); gpr_mu_unlock(p->pollset_mu); GRPC_LOG_IF_ERROR("Run client channel backup poller", err); grpc_timer_init(&p->polling_timer, @@ -128,7 +128,7 @@ void grpc_client_channel_start_backup_polling( return; } gpr_mu_lock(&g_poller_mu); - if (g_poller == NULL) { + if (g_poller == nullptr) { g_poller = (backup_poller*)gpr_zalloc(sizeof(backup_poller)); g_poller->pollset = (grpc_pollset*)gpr_zalloc(grpc_pollset_size()); g_poller->shutting_down = false; |