diff options
author | Eric Blake <eblake@redhat.com> | 2016-02-23 14:14:33 -0700 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:49:12 -0600 |
commit | a7a3d39bed1f6710350b610ff4fd82891011de4f (patch) | |
tree | 71aba8014b3f34dc689e51a85896cc210e4f73bf /numa.c | |
parent | 7e098a5faccb7e4433c235bddcd533df14af0348 (diff) | |
download | hqemu-a7a3d39bed1f6710350b610ff4fd82891011de4f.zip hqemu-a7a3d39bed1f6710350b610ff4fd82891011de4f.tar.gz |
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 'numa.c')
-rw-r--r-- | numa.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -31,7 +31,6 @@ #include "include/exec/cpu-common.h" /* for RAM_ADDR_FMT */ #include "qapi-visit.h" #include "qapi/opts-visitor.h" -#include "qapi/dealloc-visitor.h" #include "hw/boards.h" #include "sysemu/hostmem.h" #include "qmp-commands.h" @@ -243,13 +242,7 @@ static int parse_numa(void *opaque, QemuOpts *opts, Error **errp) error: error_report_err(err); - - if (object) { - QapiDeallocVisitor *dv = qapi_dealloc_visitor_new(); - visit_type_NumaOptions(qapi_dealloc_get_visitor(dv), NULL, &object, - NULL); - qapi_dealloc_visitor_cleanup(dv); - } + qapi_free_NumaOptions(object); return -1; } |