aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/json
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-10 09:53:21 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-11-10 09:53:21 -0800
commit4782d92b2d4fab261b5520a29d79ba97fea9ce7b (patch)
treed060fc1c4093583abc9348cc69a64b52d065f6e3 /src/core/lib/json
parent1ef989cd50cdfb172e99c552a67e3ed5f350e5cc (diff)
s/NULL/nullptr
Diffstat (limited to 'src/core/lib/json')
-rw-r--r--src/core/lib/json/json_string.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/lib/json/json_string.cc b/src/core/lib/json/json_string.cc
index 8674d72b7e..a339eec81b 100644
--- a/src/core/lib/json/json_string.cc
+++ b/src/core/lib/json/json_string.cc
@@ -201,7 +201,7 @@ static void json_reader_container_begins(void* userdata, grpc_json_type type) {
container = json_create_and_link(userdata, type);
state->current_container = container;
- state->current_value = NULL;
+ state->current_value = nullptr;
}
/* It's important to remember that the reader is mostly stateless, so it
@@ -280,13 +280,13 @@ static grpc_json_reader_vtable reader_vtable = {
grpc_json* grpc_json_parse_string_with_len(char* input, size_t size) {
grpc_json_reader reader;
json_reader_userdata state;
- grpc_json* json = NULL;
+ grpc_json* json = nullptr;
grpc_json_reader_status status;
- if (!input) return NULL;
+ if (!input) return nullptr;
- state.top = state.current_container = state.current_value = NULL;
- state.string = state.key = NULL;
+ state.top = state.current_container = state.current_value = nullptr;
+ state.string = state.key = nullptr;
state.string_ptr = state.input = (uint8_t*)input;
state.remaining_input = size;
grpc_json_reader_init(&reader, &reader_vtable, &state);
@@ -296,7 +296,7 @@ grpc_json* grpc_json_parse_string_with_len(char* input, size_t size) {
if ((status != GRPC_JSON_DONE) && json) {
grpc_json_destroy(json);
- json = NULL;
+ json = nullptr;
}
return json;
@@ -352,7 +352,7 @@ char* grpc_json_dump_to_string(grpc_json* json, int indent) {
grpc_json_writer writer;
json_writer_userdata state;
- state.output = NULL;
+ state.output = nullptr;
state.free_space = state.string_len = state.allocated = 0;
grpc_json_writer_init(&writer, indent, &writer_vtable, &state);