]> git.ipfire.org Git - thirdparty/qemu.git/commit - qapi/qmp-dispatch.c
qmp: De-duplicate error response building
authorMarkus Armbruster <armbru@redhat.com>
Tue, 3 Jul 2018 08:53:48 +0000 (10:53 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 3 Jul 2018 21:18:56 +0000 (23:18 +0200)
commitcee32796cadc9510ee00f029a933009df7a28ae2
tree1fb09ff3405d4ca4b75afc6304047f7376dd1ece
parenta193352ff9c7cd2cd07846118bc49921d0f53af8
qmp: De-duplicate error response building

All callers of qmp_build_error_object() duplicate the code to wrap it
in a response object.  Replace it by qmp_error_response() that
captures the duplicated code, including error_free().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180703085358.13941-23-armbru@redhat.com>
include/qapi/qmp/dispatch.h
monitor.c
qapi/qmp-dispatch.c
qga/main.c