Re: [Qemu-devel] [PATCH 22/32] qmp: De-duplicate error response building

2018-07-02 Thread Eric Blake
On 07/02/2018 11:22 AM, Markus Armbruster wrote: 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 --- include/qapi/qmp/dis

[Qemu-devel] [PATCH 22/32] qmp: De-duplicate error response building

2018-07-02 Thread Markus Armbruster
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 --- include/qapi/qmp/dispatch.h | 2 +- monitor.c | 7 +-