diff options
Diffstat (limited to 'tests/check-qom-proplist.c')
-rw-r--r-- | tests/check-qom-proplist.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 140d56439a..84f48fe592 100644 --- a/tests/check-qom-proplist.c +++ b/tests/check-qom-proplist.c @@ -125,18 +125,9 @@ static char *dummy_get_sv(Object *obj, static void dummy_init(Object *obj) { - Error *err = NULL; - object_property_add_bool(obj, "bv", dummy_get_bv, - dummy_set_bv, - NULL); - /* duplicate: */ - object_property_add_str(obj, "sv", - dummy_get_sv, - dummy_set_sv, - &err); - error_free_or_abort(&err); + dummy_set_bv); } @@ -144,14 +135,12 @@ static void dummy_class_init(ObjectClass *cls, void *data) { object_class_property_add_str(cls, "sv", dummy_get_sv, - dummy_set_sv, - NULL); + dummy_set_sv); object_class_property_add_enum(cls, "av", "DummyAnimal", &dummy_animal_map, dummy_get_av, - dummy_set_av, - NULL); + dummy_set_av); } @@ -256,13 +245,13 @@ static void dummy_dev_init(Object *obj) DummyBus *bus = DUMMY_BUS(object_new(TYPE_DUMMY_BUS)); DummyBackend *backend = DUMMY_BACKEND(object_new(TYPE_DUMMY_BACKEND)); - object_property_add_child(obj, "bus", OBJECT(bus), NULL); + object_property_add_child(obj, "bus", OBJECT(bus)); dev->bus = bus; - object_property_add_child(OBJECT(bus), "backend", OBJECT(backend), NULL); + object_property_add_child(OBJECT(bus), "backend", OBJECT(backend)); bus->backend = backend; object_property_add_link(obj, "backend", TYPE_DUMMY_BACKEND, - (Object **)&bus->backend, NULL, 0, NULL); + (Object **)&bus->backend, NULL, 0); } static void dummy_dev_unparent(Object *obj) @@ -603,11 +592,11 @@ static void test_qom_partial_path(void) * /cont1/obj2 (obj2a) * /obj2 (obj2b) */ - object_property_add_child(cont1, "obj1", obj1, &error_abort); + object_property_add_child(cont1, "obj1", obj1); object_unref(obj1); - object_property_add_child(cont1, "obj2", obj2a, &error_abort); + object_property_add_child(cont1, "obj2", obj2a); object_unref(obj2a); - object_property_add_child(root, "obj2", obj2b, &error_abort); + object_property_add_child(root, "obj2", obj2b); object_unref(obj2b); ambiguous = false; |