瀏覽代碼

reformatting: cJSON_CreateArray

Max Bruckner 8 年之前
父節點
當前提交
e241081020
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      cJSON.c

+ 11 - 1
cJSON.c

@@ -1916,7 +1916,17 @@ cJSON *cJSON_CreateString(const char *string)
     return item;
 }
 
-cJSON *cJSON_CreateArray(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Array;return item;}
+cJSON *cJSON_CreateArray(void)
+{
+    cJSON *item = cJSON_New_Item();
+    if(item)
+    {
+        item->type=cJSON_Array;
+    }
+
+    return item;
+}
+
 cJSON *cJSON_CreateObject(void)					{cJSON *item=cJSON_New_Item();if(item)item->type=cJSON_Object;return item;}
 
 /* Create Arrays: */