From 8c2be9bbff075ea8090dcf1332a1d94e21126524 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Tue, 27 Jan 2015 14:21:18 -0800 Subject: Addressing latest comments. --- src/core/json/json.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/json/json.c') diff --git a/src/core/json/json.c b/src/core/json/json.c index e7fcec31ff..1cff4fa195 100644 --- a/src/core/json/json.c +++ b/src/core/json/json.c @@ -31,23 +31,23 @@ * */ +#include + #include #include "src/core/json/json.h" -grpc_json *grpc_json_new(grpc_json_type type) { +grpc_json *grpc_json_create(grpc_json_type type) { grpc_json *json = gpr_malloc(sizeof(grpc_json)); - json->parent = json->child = json->next = json->prev = NULL; + memset(json, 0, sizeof(grpc_json)); json->type = type; - json->value = json->key = NULL; - return json; } -void grpc_json_delete(grpc_json *json) { +void grpc_json_destroy(grpc_json *json) { while (json->child) { - grpc_json_delete(json->child); + grpc_json_destroy(json->child); } if (json->next) { -- cgit v1.2.3