]> git.proxmox.com Git - mirror_qemu.git/commit - tests/test-qmp-cmds.c
qapi: Merge UserDefTwo and UserDefNested in tests
authorEric Blake <eblake@redhat.com>
Mon, 4 May 2015 15:05:29 +0000 (09:05 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 May 2015 16:39:02 +0000 (18:39 +0200)
commitb6fcf32d9b851a83dedcb609091236b97cc4a985
tree5a87aca82951293a79ec340220d24269da64c4d5
parent3e391d355644b2bff7c9f187759aadb46c6e051f
qapi: Merge UserDefTwo and UserDefNested in tests

In the testsuite, UserDefTwo and UserDefNested were identical
structs other than the member names.  Reduce code duplication by
having just one type, and choose names that also favor reuse.
This will also make it easier for a later patch to get rid of
inline nested types in QAPI.  When touching code related to
allocations, convert g_malloc0(sizeof(Type)) to the more typesafe
g_new0(Type, 1).

Ensure that 'make check-qapi-schema check-unit' still passes.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/qapi-schema-test.out
tests/test-qmp-commands.c
tests/test-qmp-input-strict.c
tests/test-qmp-input-visitor.c
tests/test-qmp-output-visitor.c
tests/test-visitor-serialization.c