pa_assert(key);
pa_assert(v);
- pa_return_val_if_fail(str = pa_proplist_gets(f->plist, key), -PA_ERR_NOENTITY);
+ str = pa_proplist_gets(f->plist, key);
+ if (!str)
+ return -PA_ERR_NOENTITY;
+
o = json_tokener_parse(str);
- pa_return_val_if_fail(!is_error(o), -PA_ERR_INVALID);
+ if (is_error(o))
+ return -PA_ERR_INVALID;
+
if (json_object_get_type(o) != json_type_int) {
json_object_put(o);
return -PA_ERR_INVALID;
return -PA_ERR_NOENTITY;
o = json_tokener_parse(str);
- pa_return_val_if_fail(!is_error(o), -PA_ERR_INVALID);
+ if (is_error(o))
+ return -PA_ERR_INVALID;
+
if (json_object_get_type(o) != json_type_string) {
json_object_put(o);
return -PA_ERR_INVALID;