From d8da9e71b6c79c2899c08bb168cd0ae88da70596 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 30 Jun 2020 11:03:29 +0200 Subject: tests: Use &error_abort where appropriate Receiving the error in a local variable only to assert there is none is less clear than passing &error_abort. Clean up. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth Message-Id: <20200630090351.1247703-5-armbru@redhat.com> --- tests/check-qom-proplist.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/check-qom-proplist.c') diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 13a824cfae..8c71734e1a 100644 --- a/tests/check-qom-proplist.c +++ b/tests/check-qom-proplist.c @@ -419,9 +419,7 @@ static void test_dummy_createcmdl(void) g_assert(dobj->bv == true); g_assert(dobj->av == DUMMY_PLATYPUS); - user_creatable_del("dev0", &err); - g_assert(err == NULL); - error_free(err); + user_creatable_del("dev0", &error_abort); object_unref(OBJECT(dobj)); @@ -485,8 +483,7 @@ static void test_dummy_getenum(void) val = object_property_get_enum(OBJECT(dobj), "av", "DummyAnimal", - &err); - g_assert(err == NULL); + &error_abort); g_assert(val == DUMMY_PLATYPUS); /* A bad enum type name */ -- cgit v1.2.3