Browse Source

reformatting: cJSONUtils_PointerEncodedstrlen

Max Bruckner 8 years ago
parent
commit
3f6716e63a
1 changed files with 13 additions and 1 deletions
  1. 13 1
      cJSON_Utils.c

+ 13 - 1
cJSON_Utils.c

@@ -61,7 +61,19 @@ static int cJSONUtils_Pstrcasecmp(const char *a, const char *e)
     return 0;
     return 0;
 }
 }
 
 
-static int cJSONUtils_PointerEncodedstrlen(const char *s)	{int l=0;for (;*s;s++,l++) if (*s=='~' || *s=='/') l++;return l;}
+static int cJSONUtils_PointerEncodedstrlen(const char *s)
+{
+    int l = 0;
+    for (; *s; s++, l++)
+    {
+        if ((*s == '~') || (*s == '/'))
+        {
+            l++;
+        }
+    }
+
+    return l;
+}
 
 
 static void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)
 static void cJSONUtils_PointerEncodedstrcpy(char *d,const char *s)
 {
 {