diff options
author | 2017-11-13 15:41:31 -0800 | |
---|---|---|
committer | 2017-11-13 15:41:31 -0800 | |
commit | b0bad8f3864dc9c8745736fe68efe513b2b84932 (patch) | |
tree | a94f7bf6f6e1d5dc257bec928359bad16623eada /src/core/ext/filters/client_channel/uri_parser.cc | |
parent | e52772451a7bbf4f3f7b72cfc369781fd74a6930 (diff) | |
parent | a61abff6adfd035560d20bc255c01c6c83d22091 (diff) |
Merge pull request #13349 from ctiller/lfe3
Convert all uses of NULL to nullptr
Diffstat (limited to 'src/core/ext/filters/client_channel/uri_parser.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/uri_parser.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/ext/filters/client_channel/uri_parser.cc b/src/core/ext/filters/client_channel/uri_parser.cc index 1cc52dec12..b76dcbe4e3 100644 --- a/src/core/ext/filters/client_channel/uri_parser.cc +++ b/src/core/ext/filters/client_channel/uri_parser.cc @@ -52,7 +52,7 @@ static grpc_uri* bad_uri(const char* uri_text, size_t pos, const char* section, gpr_free(line_prefix); } - return NULL; + return nullptr; } /** Returns a copy of percent decoded \a src[begin, end) */ @@ -148,10 +148,10 @@ static int parse_fragment_or_query(const char* uri_text, size_t* i) { static void parse_query_parts(grpc_uri* uri) { static const char* QUERY_PARTS_SEPARATOR = "&"; static const char* QUERY_PARTS_VALUE_SEPARATOR = "="; - GPR_ASSERT(uri->query != NULL); + GPR_ASSERT(uri->query != nullptr); if (uri->query[0] == '\0') { - uri->query_parts = NULL; - uri->query_parts_values = NULL; + uri->query_parts = nullptr; + uri->query_parts_values = nullptr; uri->num_query_parts = 0; return; } @@ -174,7 +174,7 @@ static void parse_query_parts(grpc_uri* uri) { * be included, even if they include the separator. */ uri->query_parts_values[i] = query_param_parts[1]; } else { - uri->query_parts_values[i] = NULL; + uri->query_parts_values[i] = nullptr; } for (size_t j = 2; j < num_query_param_parts; j++) { gpr_free(query_param_parts[j]); @@ -289,15 +289,15 @@ grpc_uri* grpc_uri_parse(grpc_exec_ctx* exec_ctx, const char* uri_text, } const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key) { - GPR_ASSERT(key != NULL); - if (key[0] == '\0') return NULL; + GPR_ASSERT(key != nullptr); + if (key[0] == '\0') return nullptr; for (size_t i = 0; i < uri->num_query_parts; ++i) { if (0 == strcmp(key, uri->query_parts[i])) { return uri->query_parts_values[i]; } } - return NULL; + return nullptr; } void grpc_uri_destroy(grpc_uri* uri) { |