mirror of
https://github.com/DaveGamble/cJSON.git
synced 2026-11-16 19:20:52 +00:00
reformatting: cJSON_New_Item
This commit is contained in:
1 parent
8db7e6d320
commit
55488f66f6
1 file changed
+7
-3
@@ -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. */
|
||||
|
||||
Reference in new issue
Block a user