mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
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>
This commit is contained in:
parent
2c0ef9f411
commit
09204eac9b
9 changed files with 42 additions and 62 deletions
|
@ -239,11 +239,11 @@ void acpi_table_add(const QemuOpts *opts, Error **errp)
|
|||
char unsigned *blob = NULL;
|
||||
|
||||
{
|
||||
OptsVisitor *ov;
|
||||
Visitor *v;
|
||||
|
||||
ov = opts_visitor_new(opts);
|
||||
visit_type_AcpiTableOptions(opts_get_visitor(ov), NULL, &hdrs, &err);
|
||||
opts_visitor_cleanup(ov);
|
||||
v = opts_visitor_new(opts);
|
||||
visit_type_AcpiTableOptions(v, NULL, &hdrs, &err);
|
||||
visit_free(v);
|
||||
}
|
||||
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue