Reformat json_object_object_get() and json_object_object_get_ex().
This commit is contained in:
@@ -400,15 +400,16 @@ json_bool json_object_object_get_ex(struct json_object* jso, const char *key, st
|
|||||||
if (value != NULL)
|
if (value != NULL)
|
||||||
*value = NULL;
|
*value = NULL;
|
||||||
|
|
||||||
if (NULL == jso) return FALSE;
|
if (NULL == jso)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
switch(jso->o_type) {
|
switch(jso->o_type)
|
||||||
|
{
|
||||||
case json_type_object:
|
case json_type_object:
|
||||||
return lh_table_lookup_ex(jso->o.c_object, (void*)key, (void**)value);
|
return lh_table_lookup_ex(jso->o.c_object, (void*)key, (void**)value);
|
||||||
default:
|
default:
|
||||||
if (value != NULL) {
|
if (value != NULL)
|
||||||
*value = NULL;
|
*value = NULL;
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user