diff options
author | Craig Tiller <ctiller@google.com> | 2017-11-10 09:53:21 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-11-10 09:53:21 -0800 |
commit | 4782d92b2d4fab261b5520a29d79ba97fea9ce7b (patch) | |
tree | d060fc1c4093583abc9348cc69a64b52d065f6e3 /src/core/lib/iomgr/combiner.cc | |
parent | 1ef989cd50cdfb172e99c552a67e3ed5f350e5cc (diff) |
s/NULL/nullptr
Diffstat (limited to 'src/core/lib/iomgr/combiner.cc')
-rw-r--r-- | src/core/lib/iomgr/combiner.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc index ca9c00b935..b28ca3464c 100644 --- a/src/core/lib/iomgr/combiner.cc +++ b/src/core/lib/iomgr/combiner.cc @@ -132,8 +132,8 @@ grpc_combiner* grpc_combiner_ref(grpc_combiner* lock GRPC_COMBINER_DEBUG_ARGS) { static void push_last_on_exec_ctx(grpc_exec_ctx* exec_ctx, grpc_combiner* lock) { - lock->next_combiner_on_this_exec_ctx = NULL; - if (exec_ctx->active_combiner == NULL) { + lock->next_combiner_on_this_exec_ctx = nullptr; + if (exec_ctx->active_combiner == nullptr) { exec_ctx->active_combiner = exec_ctx->last_combiner = lock; } else { exec_ctx->last_combiner->next_combiner_on_this_exec_ctx = lock; @@ -145,7 +145,7 @@ static void push_first_on_exec_ctx(grpc_exec_ctx* exec_ctx, grpc_combiner* lock) { lock->next_combiner_on_this_exec_ctx = exec_ctx->active_combiner; exec_ctx->active_combiner = lock; - if (lock->next_combiner_on_this_exec_ctx == NULL) { + if (lock->next_combiner_on_this_exec_ctx == nullptr) { exec_ctx->last_combiner = lock; } } @@ -190,8 +190,8 @@ static void combiner_exec(grpc_exec_ctx* exec_ctx, grpc_closure* cl, static void move_next(grpc_exec_ctx* exec_ctx) { exec_ctx->active_combiner = exec_ctx->active_combiner->next_combiner_on_this_exec_ctx; - if (exec_ctx->active_combiner == NULL) { - exec_ctx->last_combiner = NULL; + if (exec_ctx->active_combiner == nullptr) { + exec_ctx->last_combiner = nullptr; } } @@ -210,7 +210,7 @@ static void queue_offload(grpc_exec_ctx* exec_ctx, grpc_combiner* lock) { bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) { GPR_TIMER_BEGIN("combiner.continue_exec_ctx", 0); grpc_combiner* lock = exec_ctx->active_combiner; - if (lock == NULL) { + if (lock == nullptr) { GPR_TIMER_END("combiner.continue_exec_ctx", 0); return false; } @@ -244,7 +244,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) { gpr_mpscq_node* n = gpr_mpscq_pop(&lock->queue); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n)); - if (n == NULL) { + if (n == nullptr) { // queue is in an inconsistent state: use this as a cue that we should // go off and do something else for a while (and come back later) GPR_TIMER_MARK("delay_busy", 0); @@ -263,10 +263,10 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx* exec_ctx) { GPR_TIMER_END("combiner.exec1", 0); } else { grpc_closure* c = lock->final_list.head; - GPR_ASSERT(c != NULL); + GPR_ASSERT(c != nullptr); grpc_closure_list_init(&lock->final_list); int loops = 0; - while (c != NULL) { + while (c != nullptr) { GPR_TIMER_BEGIN("combiner.exec_1final", 0); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c)); |