cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit 186cce3ece6ce6dfcb58ac8b2a63f7846c3493ad
parent 6c9f76c1002a9bb9685db82fbaf1c2f9f34e7055
Author: Max Bruckner <max@maxbruckner.de>
Date:   Wed, 10 May 2017 00:52:33 +0200

Fix -Wcomma

Diffstat:
McJSON.c | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/cJSON.c b/cJSON.c @@ -2560,16 +2560,18 @@ CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * cons case cJSON_Array: { - cJSON *a_element = NULL; - cJSON *b_element = NULL; - for (a_element = a->child, b_element = b->child; - (a_element != NULL) && (b_element != NULL); - a_element = a_element->next, b_element = b_element->next) + cJSON *a_element = a->child; + cJSON *b_element = b->child; + + for (; (a_element != NULL) && (b_element != NULL);) { if (!cJSON_Compare(a_element, b_element, case_sensitive)) { return false; } + + a_element = a_element->next; + b_element = b_element->next; } return true;