aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qom-proplist.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-30 11:03:29 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-02 06:25:28 +0200
commitd8da9e71b6c79c2899c08bb168cd0ae88da70596 (patch)
tree0965f9b9391d00e65b79e37776f7eb546f14d2d5 /tests/check-qom-proplist.c
parent9261ef5e32b0559642ccb70565836e1bc023937e (diff)
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 <armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20200630090351.1247703-5-armbru@redhat.com>
Diffstat (limited to 'tests/check-qom-proplist.c')
-rw-r--r--tests/check-qom-proplist.c7
1 files changed, 2 insertions, 5 deletions
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 */