aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/util/json_util.cc
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-11-14 11:30:26 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-11-14 11:30:26 -0800
commitc613aa0a08dec365be7c7c37aa66941426a5bd9a (patch)
tree92fb15eaab80c5101e1a614aefc6fcc3388cde69 /src/core/lib/security/util/json_util.cc
parent60b376849a2c7b9faa8ae5a6ec2e1d6d1aacff43 (diff)
parent38107493cd0150bed33d3a8472cc8700b7de8a21 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into eager-free
Diffstat (limited to 'src/core/lib/security/util/json_util.cc')
-rw-r--r--src/core/lib/security/util/json_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/lib/security/util/json_util.cc b/src/core/lib/security/util/json_util.cc
index 365bd1537c..fef1a1f51d 100644
--- a/src/core/lib/security/util/json_util.cc
+++ b/src/core/lib/security/util/json_util.cc
@@ -26,12 +26,12 @@
const char* grpc_json_get_string_property(const grpc_json* json,
const char* prop_name) {
grpc_json* child;
- for (child = json->child; child != NULL; child = child->next) {
+ for (child = json->child; child != nullptr; child = child->next) {
if (strcmp(child->key, prop_name) == 0) break;
}
- if (child == NULL || child->type != GRPC_JSON_STRING) {
+ if (child == nullptr || child->type != GRPC_JSON_STRING) {
gpr_log(GPR_ERROR, "Invalid or missing %s property.", prop_name);
- return NULL;
+ return nullptr;
}
return child->value;
}
@@ -40,7 +40,7 @@ bool grpc_copy_json_string_property(const grpc_json* json,
const char* prop_name,
char** copied_value) {
const char* prop_value = grpc_json_get_string_property(json, prop_name);
- if (prop_value == NULL) return false;
+ if (prop_value == nullptr) return false;
*copied_value = gpr_strdup(prop_value);
return true;
}