From af44d570073773f057fc22d75ed9baa029c440ab Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Fri, 30 Sep 2016 10:35:48 +0700 Subject: [PATCH] reformatting: cJSON_GetObjectItem --- cJSON.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 9e335c1..ad0535e 100644 --- a/cJSON.c +++ b/cJSON.c @@ -1605,7 +1605,16 @@ cJSON *cJSON_GetArrayItem(cJSON *array, int item) return c; } -cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object?object->child:0;while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;} +cJSON *cJSON_GetObjectItem(cJSON *object, const char *string) +{ + cJSON *c = object ? object->child : 0; + while (c && cJSON_strcasecmp(c->string, string)) + { + c = c->next; + } + return c; +} + int cJSON_HasObjectItem(cJSON *object,const char *string) {return cJSON_GetObjectItem(object,string)?1:0;} /* Utility for array list handling. */