From 09204eac9bb513e56992c00c75f32f9d4766256b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 9 Jun 2016 10:48:36 -0600 Subject: 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 Message-Id: <1465490926-28625-6-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'numa.c') diff --git a/numa.c b/numa.c index 572712ccf9..cbae430e36 100644 --- a/numa.c +++ b/numa.c @@ -217,9 +217,9 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp) Error *err = NULL; { - OptsVisitor *ov = opts_visitor_new(opts); - visit_type_NumaOptions(opts_get_visitor(ov), NULL, &object, &err); - opts_visitor_cleanup(ov); + Visitor *v = opts_visitor_new(opts); + visit_type_NumaOptions(v, NULL, &object, &err); + visit_free(v); } if (err) { -- cgit v1.2.1