aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/http_connect_handshaker.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-16 19:31:28 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-16 19:31:28 -0800
commit177039b2f89e73ad0d048da021f939f3a153c4e2 (patch)
treec7f10f04cd9a0872863e2b181162bc9928160cd8 /src/core/ext/filters/client_channel/http_connect_handshaker.cc
parent995aa91bbbc68deb6dfd7c667cfee3af2bedec08 (diff)
parent82c8f945302f128495e261b853ac49f1dfbe69a1 (diff)
Merge master
Diffstat (limited to 'src/core/ext/filters/client_channel/http_connect_handshaker.cc')
-rw-r--r--src/core/ext/filters/client_channel/http_connect_handshaker.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc
index 14b3836b90..556a3bc6a1 100644
--- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc
+++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc
@@ -64,10 +64,10 @@ typedef struct http_connect_handshaker {
static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) {
if (gpr_unref(&handshaker->refcount)) {
gpr_mu_destroy(&handshaker->mu);
- if (handshaker->endpoint_to_destroy != NULL) {
+ if (handshaker->endpoint_to_destroy != nullptr) {
grpc_endpoint_destroy(handshaker->endpoint_to_destroy);
}
- if (handshaker->read_buffer_to_destroy != NULL) {
+ if (handshaker->read_buffer_to_destroy != nullptr) {
grpc_slice_buffer_destroy_internal(handshaker->read_buffer_to_destroy);
gpr_free(handshaker->read_buffer_to_destroy);
}
@@ -78,16 +78,16 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) {
}
}
-// Set args fields to NULL, saving the endpoint and read buffer for
+// Set args fields to nullptr, saving the endpoint and read buffer for
// later destruction.
static void cleanup_args_for_failure_locked(
http_connect_handshaker* handshaker) {
handshaker->endpoint_to_destroy = handshaker->args->endpoint;
- handshaker->args->endpoint = NULL;
+ handshaker->args->endpoint = nullptr;
handshaker->read_buffer_to_destroy = handshaker->args->read_buffer;
- handshaker->args->read_buffer = NULL;
+ handshaker->args->read_buffer = nullptr;
grpc_channel_args_destroy(handshaker->args->args);
- handshaker->args->args = NULL;
+ handshaker->args->args = nullptr;
}
// If the handshake failed or we're shutting down, clean up and invoke the
@@ -249,7 +249,7 @@ static void http_connect_handshaker_do_handshake(
// If not found, invoke on_handshake_done without doing anything.
const grpc_arg* arg =
grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_SERVER);
- if (arg == NULL) {
+ if (arg == nullptr) {
// Set shutdown to true so that subsequent calls to
// http_connect_handshaker_shutdown() do nothing.
gpr_mu_lock(&handshaker->mu);
@@ -262,11 +262,11 @@ static void http_connect_handshaker_do_handshake(
char* server_name = arg->value.string;
// Get headers from channel args.
arg = grpc_channel_args_find(args->args, GRPC_ARG_HTTP_CONNECT_HEADERS);
- grpc_http_header* headers = NULL;
+ grpc_http_header* headers = nullptr;
size_t num_headers = 0;
- char** header_strings = NULL;
+ char** header_strings = nullptr;
size_t num_header_strings = 0;
- if (arg != NULL) {
+ if (arg != nullptr) {
GPR_ASSERT(arg->type == GRPC_ARG_STRING);
gpr_string_split(arg->value.string, "\n", &header_strings,
&num_header_strings);
@@ -274,7 +274,7 @@ static void http_connect_handshaker_do_handshake(
num_header_strings);
for (size_t i = 0; i < num_header_strings; ++i) {
char* sep = strchr(header_strings[i], ':');
- if (sep == NULL) {
+ if (sep == nullptr) {
gpr_log(GPR_ERROR, "skipping unparseable HTTP CONNECT header: %s",
header_strings[i]);
continue;