aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client/channel_cc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/client/channel_cc.cc')
-rw-r--r--src/cpp/client/channel_cc.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index 9df531066e..08420817c8 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -61,11 +61,11 @@ namespace {
grpc::string GetChannelInfoField(grpc_channel* channel,
grpc_channel_info* channel_info,
char*** channel_info_field) {
- char* value = NULL;
+ char* value = nullptr;
memset(channel_info, 0, sizeof(*channel_info));
*channel_info_field = &value;
grpc_channel_get_info(channel, channel_info);
- if (value == NULL) return "";
+ if (value == nullptr) return "";
grpc::string result = value;
gpr_free(value);
return result;
@@ -89,14 +89,14 @@ internal::Call Channel::CreateCall(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq) {
const bool kRegistered = method.channel_tag() && context->authority().empty();
- grpc_call* c_call = NULL;
+ grpc_call* c_call = nullptr;
if (kRegistered) {
c_call = grpc_channel_create_registered_call(
c_channel_, context->propagate_from_call_,
context->propagation_options_.c_bitmask(), cq->cq(),
method.channel_tag(), context->raw_deadline(), nullptr);
} else {
- const char* host_str = NULL;
+ const char* host_str = nullptr;
if (!context->authority().empty()) {
host_str = context->authority_.c_str();
} else if (!host_.empty()) {
@@ -134,7 +134,7 @@ void Channel::PerformOpsOnCall(internal::CallOpSetInterface* ops,
void* Channel::RegisterMethod(const char* method) {
return grpc_channel_register_call(
- c_channel_, method, host_.empty() ? NULL : host_.c_str(), nullptr);
+ c_channel_, method, host_.empty() ? nullptr : host_.c_str(), nullptr);
}
grpc_connectivity_state Channel::GetState(bool try_to_connect) {
@@ -171,10 +171,10 @@ bool Channel::WaitForStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline) {
CompletionQueue cq;
bool ok = false;
- void* tag = NULL;
- NotifyOnStateChangeImpl(last_observed, deadline, &cq, NULL);
+ void* tag = nullptr;
+ NotifyOnStateChangeImpl(last_observed, deadline, &cq, nullptr);
cq.Next(&tag, &ok);
- GPR_ASSERT(tag == NULL);
+ GPR_ASSERT(tag == nullptr);
return ok;
}