aboutsummaryrefslogtreecommitdiff
path: root/tests/check-qom-proplist.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-30 11:03:30 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-07-02 06:25:28 +0200
commit7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4 (patch)
tree8509cd5889e30feca6a3ad26ea1735e7e4b108e6 /tests/check-qom-proplist.c
parentd8da9e71b6c79c2899c08bb168cd0ae88da70596 (diff)
downloadqemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.zip
qemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.tar.gz
qemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.tar.bz2
tests: Use error_free_or_abort() where appropriate
Replace g_assert(err != NULL); error_free(err); err = NULL; and variations thereof by error_free_or_abort(&err); Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200630090351.1247703-6-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 8c71734..e1e0a96 100644
--- a/tests/check-qom-proplist.c
+++ b/tests/check-qom-proplist.c
@@ -491,17 +491,14 @@ static void test_dummy_getenum(void)
"av",
"BadAnimal",
&err);
- g_assert(err != NULL);
- error_free(err);
- err = NULL;
+ error_free_or_abort(&err);
/* A non-enum property name */
val = object_property_get_enum(OBJECT(dobj),
"iv",
"DummyAnimal",
&err);
- g_assert(err != NULL);
- error_free(err);
+ error_free_or_abort(&err);
object_unparent(OBJECT(dobj));
}