]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Avoid unnecessary copies of command string
authorPeter Krempa <pkrempa@redhat.com>
Tue, 26 Mar 2019 17:33:01 +0000 (18:33 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Apr 2019 09:58:10 +0000 (11:58 +0200)
commitac21141ce497c7d8d8426f42b953ae82ec9da916
tree2b89147004993ef7ca244d6c3a595896e3e860a4
parentd8306dce0f33568dc0f1af760047180f7ab668fd
qemu: monitor: Avoid unnecessary copies of command string

Use virJSONValueToBuffer so that we can append the command terminator
string without copying of the string again. Also avoid a 'strlen' as we
can query the buffer use size.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
src/qemu/qemu_monitor_json.c