Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pass_args_to_tsi
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn committed Nov 14, 2017
2 parents 248c4f5 + b0bad8f commit 16ba80c
Show file tree
Hide file tree
Showing 454 changed files with 8,431 additions and 9,487 deletions.
5 changes: 5 additions & 0 deletions .clang_complete
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
-Ithird_party/zlib
-Ithird_party/protobuf/src
-Ithird_party/abseil-cpp
-Ithird_party/cares/cares
-Ithird_party/cares
-Ithird_party/googletest/googletest/include
-Ithird_party/googletest/googlemock/include

4 changes: 2 additions & 2 deletions src/core/ext/census/grpc_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
void grpc_census_call_set_context(grpc_call* call, census_context* context) {
GRPC_API_TRACE("grpc_census_call_set_context(call=%p, census_context=%p)", 2,
(call, context));
if (context != NULL) {
grpc_call_context_set(call, GRPC_CONTEXT_TRACING, context, NULL);
if (context != nullptr) {
grpc_call_context_set(call, GRPC_CONTEXT_TRACING, context, nullptr);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/core/ext/filters/client_channel/backup_poller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -86,7 +86,7 @@ static void g_poller_unref(grpc_exec_ctx* exec_ctx) {
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;
Expand All @@ -113,7 +113,7 @@ static void run_poller(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) {
backup_poller_shutdown_unref(exec_ctx, p);
return;
}
grpc_error* err = grpc_pollset_work(exec_ctx, p->pollset, NULL,
grpc_error* err = grpc_pollset_work(exec_ctx, p->pollset, nullptr,
grpc_exec_ctx_now(exec_ctx));
gpr_mu_unlock(p->pollset_mu);
GRPC_LOG_IF_ERROR("Run client channel backup poller", err);
Expand All @@ -129,7 +129,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;
Expand Down
6 changes: 3 additions & 3 deletions src/core/ext/filters/client_channel/channel_connectivity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ static void partly_done(grpc_exec_ctx* exec_ctx, state_watcher* w,
grpc_channel_get_channel_stack(w->channel));
grpc_client_channel_watch_connectivity_state(
exec_ctx, client_channel_elem,
grpc_polling_entity_create_from_pollset(grpc_cq_pollset(w->cq)), NULL,
&w->on_complete, NULL);
grpc_polling_entity_create_from_pollset(grpc_cq_pollset(w->cq)),
nullptr, &w->on_complete, nullptr);
}

gpr_mu_lock(&w->mu);
Expand Down Expand Up @@ -229,7 +229,7 @@ void grpc_channel_watch_connectivity_state(
w->cq = cq;
w->tag = tag;
w->channel = channel;
w->error = NULL;
w->error = nullptr;

watcher_timer_init_arg* wa =
(watcher_timer_init_arg*)gpr_malloc(sizeof(watcher_timer_init_arg));
Expand Down
Loading

0 comments on commit 16ba80c

Please sign in to comment.