aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-06-09 10:48:36 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-07-06 10:52:04 +0200
commit09204eac9bb513e56992c00c75f32f9d4766256b (patch)
treea83c6884b990b0d3782cc1f40f69787085f4a6cd /tests
parent2c0ef9f411ae6081efa9eca5b3eab2dbeee45a6c (diff)
opts-visitor: Favor new visit_free() function
Now that we have a polymorphic visit_free(), we no longer need opts_visitor_cleanup(); which in turn means we no longer need to return a subtype from opts_visitor_new() nor a public upcast function. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <1465490926-28625-6-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-opts-visitor.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test-opts-visitor.c b/tests/test-opts-visitor.c
index d75b114c15..0a9e75f1bb 100644
--- a/tests/test-opts-visitor.c
+++ b/tests/test-opts-visitor.c
@@ -37,16 +37,15 @@ setup_fixture(OptsVisitorFixture *f, gconstpointer test_data)
{
const char *opts_string = test_data;
QemuOpts *opts;
- OptsVisitor *ov;
+ Visitor *v;
opts = qemu_opts_parse(qemu_find_opts("userdef"), opts_string, false,
NULL);
g_assert(opts != NULL);
- ov = opts_visitor_new(opts);
- visit_type_UserDefOptions(opts_get_visitor(ov), NULL, &f->userdef,
- &f->err);
- opts_visitor_cleanup(ov);
+ v = opts_visitor_new(opts);
+ visit_type_UserDefOptions(v, NULL, &f->userdef, &f->err);
+ visit_free(v);
qemu_opts_del(opts);
}