util: common: Replace prototype of json helper functions to get correct value
The get_int_from_object() returns '-EINVAL' when json object doesn't
contain ' key'. But it isn't correct because 'int' value is able
to get the minus value. It means that when get_int_from_object() return -EINVAL,
it is not error on side of user. To fix them, return the error and then
get the value as the parameter. Also, get_double_from_object() has the same issue.
Also, in order that keep the consistent prototype of json helper functions,
changes the functiosn as following:
- int get_int_from_object(json_object *obj, const char *key, int *data);
- int get_double_from_object(json_object *obj, const char *key, double *data);
- int get_boolean_from_object(json_object *obj, const char *key, bool *data);
Change-Id: I0a9b9da36312a0d86920f259b1f702095f104da6
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>