From cf7835b67da3fce0953462c38b99c93c35d001a1 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Fri, 30 Sep 2016 10:47:31 +0700 Subject: [PATCH] reformatting: cJSON_CreateNull --- cJSON.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 5c3dc59..98a79e0 100644 --- a/cJSON.c +++ b/cJSON.c @@ -1842,7 +1842,17 @@ void cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem } /* Create basic types: */ -cJSON *cJSON_CreateNull(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_NULL;return item;} +cJSON *cJSON_CreateNull(void) +{ + cJSON *item = cJSON_New_Item(); + if(item) + { + item->type = cJSON_NULL; + } + + return item; +} + cJSON *cJSON_CreateTrue(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_True;return item;} cJSON *cJSON_CreateFalse(void) {cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_False;return item;} cJSON *cJSON_CreateBool(int b) {cJSON *item=cJSON_New_Item();if(item)item->type=b?cJSON_True:cJSON_False;return item;}