aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/transport
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2017-11-14 14:58:20 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2017-11-14 14:58:20 -0800
commit882dfeddd5e4503493a3a88733ed9a0fc4af436e (patch)
treec94e70c17ad1003b54886fad625c02c8c57510e1 /src/core/lib/transport
parent4fde068b04825444e9239b8a24d642549e606f2d (diff)
clang tidy
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r--src/core/lib/transport/connectivity_state.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc
index e6f3b0429e..e7e5dbd1f1 100644
--- a/src/core/lib/transport/connectivity_state.cc
+++ b/src/core/lib/transport/connectivity_state.cc
@@ -47,7 +47,7 @@ void grpc_connectivity_state_init(grpc_connectivity_state_tracker* tracker,
const char* name) {
gpr_atm_no_barrier_store(&tracker->current_state_atm, init_state);
tracker->current_error = GRPC_ERROR_NONE;
- tracker->watchers = NULL;
+ tracker->watchers = nullptr;
tracker->name = gpr_strdup(name);
}
@@ -93,7 +93,7 @@ grpc_connectivity_state grpc_connectivity_state_get(
gpr_log(GPR_DEBUG, "CONWATCH: %p %s: get %s", tracker, tracker->name,
grpc_connectivity_state_name(cur));
}
- if (error != NULL) {
+ if (error != nullptr) {
*error = GRPC_ERROR_REF(tracker->current_error);
}
return cur;
@@ -101,7 +101,7 @@ grpc_connectivity_state grpc_connectivity_state_get(
bool grpc_connectivity_state_has_watchers(
grpc_connectivity_state_tracker* connectivity_state) {
- return connectivity_state->watchers != NULL;
+ return connectivity_state->watchers != nullptr;
}
bool grpc_connectivity_state_notify_on_state_change(
@@ -111,7 +111,7 @@ bool grpc_connectivity_state_notify_on_state_change(
(grpc_connectivity_state)gpr_atm_no_barrier_load(
&tracker->current_state_atm);
if (grpc_connectivity_state_trace.enabled()) {
- if (current == NULL) {
+ if (current == nullptr) {
gpr_log(GPR_DEBUG, "CONWATCH: %p %s: unsubscribe notify=%p", tracker,
tracker->name, notify);
} else {
@@ -120,17 +120,17 @@ bool grpc_connectivity_state_notify_on_state_change(
grpc_connectivity_state_name(cur), notify);
}
}
- if (current == NULL) {
+ if (current == nullptr) {
grpc_connectivity_state_watcher* w = tracker->watchers;
- if (w != NULL && w->notify == notify) {
+ if (w != nullptr && w->notify == notify) {
GRPC_CLOSURE_SCHED(exec_ctx, notify, GRPC_ERROR_CANCELLED);
tracker->watchers = w->next;
gpr_free(w);
return false;
}
- while (w != NULL) {
+ while (w != nullptr) {
grpc_connectivity_state_watcher* rm_candidate = w->next;
- if (rm_candidate != NULL && rm_candidate->notify == notify) {
+ if (rm_candidate != nullptr && rm_candidate->notify == notify) {
GRPC_CLOSURE_SCHED(exec_ctx, notify, GRPC_ERROR_CANCELLED);
w->next = w->next->next;
gpr_free(rm_candidate);
@@ -188,7 +188,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx* exec_ctx,
}
GPR_ASSERT(cur != GRPC_CHANNEL_SHUTDOWN);
gpr_atm_no_barrier_store(&tracker->current_state_atm, state);
- while ((w = tracker->watchers) != NULL) {
+ while ((w = tracker->watchers) != nullptr) {
*w->current = state;
tracker->watchers = w->next;
if (grpc_connectivity_state_trace.enabled()) {