]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Remove duplicated code in qemuBuildSerialChrDeviceStr()
authorAndrea Bolognani <abologna@redhat.com>
Thu, 22 Jun 2017 10:08:46 +0000 (18:08 +0800)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 21 Jul 2017 16:10:50 +0000 (18:10 +0200)
commitf3178da032f7b117324970fa5142edeba0e49098
treedd5db794c0b9d5770a39688cdb6e74efd60fa7bf
parent66fa0d969ac06b6715464969f7e46e191e31c5ad
qemu: Remove duplicated code in qemuBuildSerialChrDeviceStr()

The call to qemuBuildDeviceAddressStr() happens no matter
what, so we can move it to the outer possible scope inside
the function.

We can also move the call to virBufferAsprintf() after all
the checks have been performed, where it makes more sense.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_command.c