summaryrefslogtreecommitdiffstats
path: root/tests/test-bdrv-graph-mod.c
diff options
context:
space:
mode:
authorMarkus Armbruster2020-06-30 11:03:30 +0200
committerMarkus Armbruster2020-07-02 06:25:28 +0200
commit7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4 (patch)
tree8509cd5889e30feca6a3ad26ea1735e7e4b108e6 /tests/test-bdrv-graph-mod.c
parenttests: Use &error_abort where appropriate (diff)
downloadqemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.tar.gz
qemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.tar.xz
qemu-7b8eb7f848fdd808dbd01f6aa7ae42fd8c64e4b4.zip
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/test-bdrv-graph-mod.c')
-rw-r--r--tests/test-bdrv-graph-mod.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test-bdrv-graph-mod.c b/tests/test-bdrv-graph-mod.c
index f93f3168b0..8cff13830e 100644
--- a/tests/test-bdrv-graph-mod.c
+++ b/tests/test-bdrv-graph-mod.c
@@ -115,9 +115,7 @@ static void test_update_perm_tree(void)
BDRV_CHILD_FILTERED | BDRV_CHILD_PRIMARY, &error_abort);
bdrv_append(filter, bs, &local_err);
-
- g_assert_nonnull(local_err);
- error_free(local_err);
+ error_free_or_abort(&local_err);
blk_unref(root);
}