[libvirt] [PATCH 1/3] qemu: refactor: use switch for enum in qemuProcessGraphicsReservePorts

John Ferlan jferlan at redhat.com
Thu Dec 8 13:21:40 UTC 2016



On 11/22/2016 06:09 AM, Nikolay Shirokovskiy wrote:
> ---
>  src/qemu/qemu_process.c | 30 +++++++++++++++++++++---------
>  1 file changed, 21 insertions(+), 9 deletions(-)
> 

ACK - although I'll reword commit a bit:

    qemu: Refactor qemuProcessGraphicsReservePorts

    Use switch for enums rather than if/else conditions.

John

FWIW: After reading patch 2, why not alter the code in qemuProcessStop
in order to have a switch too?  In fact that code could be split out
into a qemuProcessGraphicsUnreservePorts function.  If you want to make
a v2 to do then, then let me know.




More information about the libvir-list mailing list