diff options
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) { |