From 55488f66f60269d309b7d1a0620bdf8c4dfbf7d9 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 27 Sep 2016 23:40:16 +0700 Subject: [PATCH] reformatting: cJSON_New_Item --- cJSON.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cJSON.c b/cJSON.c index 0ba5925..04c5ceb 100644 --- a/cJSON.c +++ b/cJSON.c @@ -96,9 +96,13 @@ void cJSON_InitHooks(cJSON_Hooks* hooks) /* Internal constructor. */ static cJSON *cJSON_New_Item(void) { - cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON)); - if (node) memset(node,0,sizeof(cJSON)); - return node; + cJSON* node = (cJSON*)cJSON_malloc(sizeof(cJSON)); + if (node) + { + memset(node, 0, sizeof(cJSON)); + } + + return node; } /* Delete a cJSON structure. */