Slight style tweaks to the bsearch changest.

This commit is contained in:
Eric Haszlakiewicz
2015-03-04 03:10:10 +00:00
parent a500c1f0b5
commit 484ca368f0
4 changed files with 12 additions and 14 deletions

View File

@@ -892,18 +892,16 @@ void json_object_array_sort(struct json_object *jso, int(*sort_fn)(const void *,
struct json_object* json_object_array_bsearch(
const struct json_object *key,
const struct json_object *jso,
int (*sort_fn)(const void *, const void *) )
int (*sort_fn)(const void *, const void *))
{
struct json_object **result;
result = (struct json_object **) array_list_bsearch(
(const void **) &key, jso->o.c_array, sort_fn );
result = (struct json_object **)array_list_bsearch(
(const void **)&key, jso->o.c_array, sort_fn);
if ( result == NULL ) {
if (!result)
return NULL;
} else {
return *result;
}
return *result;
}
int json_object_array_length(struct json_object *jso)