reformatting: cJSON_New_Item

This commit is contained in:
Max Bruckner 2016-09-27 23:40:16 +07:00
parent 8db7e6d320
commit 55488f66f6
1 changed files with 7 additions and 3 deletions

10
cJSON.c
View File

@ -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. */