Skip to content

Commit

Permalink
Fix -Wcomma
Browse files Browse the repository at this point in the history
  • Loading branch information
FSMaxB committed May 9, 2017
1 parent 6c9f76c commit 186cce3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 186cce3

Please sign in to comment.