1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-23 15:12:04 +00:00

cJSON_CreateRaw: Format fixes

This commit is contained in:
Max Bruckner 2017-01-05 21:33:52 +01:00
parent 1df987a170
commit e3e0b5150b

26
cJSON.c
View File

@ -2019,19 +2019,19 @@ cJSON *cJSON_CreateString(const char *string)
extern cJSON *cJSON_CreateRaw(const char *raw)
{
cJSON *item = cJSON_New_Item();
if(item)
{
item->type = cJSON_Raw;
item->valuestring = cJSON_strdup(raw);
if(!item->valuestring)
{
cJSON_Delete(item);
return 0;
}
}
return item;
cJSON *item = cJSON_New_Item();
if(item)
{
item->type = cJSON_Raw;
item->valuestring = cJSON_strdup(raw);
if(!item->valuestring)
{
cJSON_Delete(item);
return NULL;
}
}
return item;
}
cJSON *cJSON_CreateArray(void)