diff options
author | Eric Blake <eblake@redhat.com> | 2016-02-23 14:14:33 -0700 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-03-04 17:16:32 +0100 |
commit | 96a1616c85ae62fc13aff85a34effb4b2477b7ce (patch) | |
tree | 3a87d13bf2cc96c9a9fce68be7adb3c642606981 /hw/acpi | |
parent | e55250c6cb4cf836f9188095a21c85f663aac06b (diff) | |
download | qemu-96a1616c85ae62fc13aff85a34effb4b2477b7ce.zip qemu-96a1616c85ae62fc13aff85a34effb4b2477b7ce.tar.gz qemu-96a1616c85ae62fc13aff85a34effb4b2477b7ce.tar.bz2 |
qapi-dealloc: Reduce use outside of generated code
No need to roll our own use of the dealloc visitors when we can
just directly use the qapi_free_FOO() functions that do what we
want in one line.
In net.c, inline net_visit() into its remaining lone caller.
After this patch, test-visitor-serialization.c is the only
non-generated file that needs to use a dealloc visitor, because
it is testing low level aspects of the visitor interface.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1456262075-3311-2-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/acpi')
-rw-r--r-- | hw/acpi/core.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 3a14e90..3d9e5c4 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -26,7 +26,6 @@ #include "hw/nvram/fw_cfg.h" #include "qemu/config-file.h" #include "qapi/opts-visitor.h" -#include "qapi/dealloc-visitor.h" #include "qapi-visit.h" #include "qapi-event.h" @@ -297,15 +296,7 @@ void acpi_table_add(const QemuOpts *opts, Error **errp) out: g_free(blob); g_strfreev(pathnames); - - if (hdrs != NULL) { - QapiDeallocVisitor *dv; - - dv = qapi_dealloc_visitor_new(); - visit_type_AcpiTableOptions(qapi_dealloc_get_visitor(dv), NULL, &hdrs, - NULL); - qapi_dealloc_visitor_cleanup(dv); - } + qapi_free_AcpiTableOptions(hdrs); error_propagate(errp, err); } |