From 3f6716e63a489fe3d5967297cc504774e1f9a4b0 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Thu, 13 Oct 2016 23:42:34 +0700 Subject: [PATCH] reformatting: cJSONUtils_PointerEncodedstrlen --- cJSON_Utils.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 8015b7a..f816948 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -61,7 +61,19 @@ static int cJSONUtils_Pstrcasecmp(const char *a, const char *e) 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) {