]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
formatting README.md
authordm8.kim <dm8.kim@hanwha.com>
Tue, 11 Feb 2020 04:25:02 +0000 (13:25 +0900)
committerdm8.kim <dm8.kim@hanwha.com>
Tue, 11 Feb 2020 04:25:02 +0000 (13:25 +0900)
README.md

index 9a6226fe568db30cc4a9be1d69ee874d8b0fa339..85c06f589463279431e5345e171edf7202f87d50 100644 (file)
--- a/README.md
+++ b/README.md
@@ -324,7 +324,7 @@ Let's build the above JSON and print it to a string:
 ```c
 //create a monitor with a list of supported resolutions
 //NOTE: Returns a heap allocated string, you are required to free it after use.
-charcreate_monitor(void)
+char *create_monitor(void)
 {
     const unsigned int resolution_numbers[3][2] = {
         {1280, 720},
@@ -434,7 +434,7 @@ char *create_monitor_with_helpers(void)
             goto end;
         }
 
-        if(cJSON_AddNumberToObject(resolution, "height", resolution_numbers[index][1]) == NULL)
+        if (cJSON_AddNumberToObject(resolution, "height", resolution_numbers[index][1]) == NULL)
         {
             goto end;
         }
@@ -443,7 +443,8 @@ char *create_monitor_with_helpers(void)
     }
 
     string = cJSON_Print(monitor);
-    if (string == NULL) {
+    if (string == NULL)
+    {
         fprintf(stderr, "Failed to print monitor.\n");
     }