From 7bdafd3b41e6fbcfdf74f3329f2daf797604ecee Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 11 Oct 2019 16:15:38 +0000 Subject: lib: require json-c We have unsigned 4 byte integrals in the codebase that end up in json output, so we need to force a json library that can handle these. Signed-off-by: Quentin Young --- lib/json.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'lib/json.c') diff --git a/lib/json.c b/lib/json.c index efc3794040..991240639a 100644 --- a/lib/json.c +++ b/lib/json.c @@ -47,11 +47,7 @@ void json_object_string_add(struct json_object *obj, const char *key, void json_object_int_add(struct json_object *obj, const char *key, int64_t i) { -#if defined(HAVE_JSON_C_JSON_H) json_object_object_add(obj, key, json_object_new_int64(i)); -#else - json_object_object_add(obj, key, json_object_new_int((int)i)); -#endif } void json_object_boolean_false_add(struct json_object *obj, const char *key) @@ -78,16 +74,3 @@ void json_object_free(struct json_object *obj) { json_object_put(obj); } - -#if !defined(HAVE_JSON_C_JSON_H) -int json_object_object_get_ex(struct json_object *obj, const char *key, - struct json_object **value) -{ - *value = json_object_object_get(obj, key); - - if (*value) - return 1; - - return 0; -} -#endif -- cgit v1.2.3