mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
cJSON_CreateRaw: Format fixes
This commit is contained in:
parent
1df987a170
commit
e3e0b5150b
24
cJSON.c
24
cJSON.c
@ -2019,19 +2019,19 @@ cJSON *cJSON_CreateString(const char *string)
|
|||||||
|
|
||||||
extern cJSON *cJSON_CreateRaw(const char *raw)
|
extern cJSON *cJSON_CreateRaw(const char *raw)
|
||||||
{
|
{
|
||||||
cJSON *item = cJSON_New_Item();
|
cJSON *item = cJSON_New_Item();
|
||||||
if(item)
|
if(item)
|
||||||
{
|
{
|
||||||
item->type = cJSON_Raw;
|
item->type = cJSON_Raw;
|
||||||
item->valuestring = cJSON_strdup(raw);
|
item->valuestring = cJSON_strdup(raw);
|
||||||
if(!item->valuestring)
|
if(!item->valuestring)
|
||||||
{
|
{
|
||||||
cJSON_Delete(item);
|
cJSON_Delete(item);
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
cJSON *cJSON_CreateArray(void)
|
cJSON *cJSON_CreateArray(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user