From e3e0b5150b58ae7341cfbd38d999d9bee79bdb63 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Thu, 5 Jan 2017 21:33:52 +0100 Subject: [PATCH] cJSON_CreateRaw: Format fixes --- cJSON.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cJSON.c b/cJSON.c index 6ded617..b7de473 100644 --- a/cJSON.c +++ b/cJSON.c @@ -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)