[libvirt] [PATCH 5/5] qemu: domain: Use typecasted enum in qemuDomainDeviceDefPostParse

Ján Tomko jtomko at redhat.com
Thu May 24 16:24:38 UTC 2018


On Thu, May 24, 2018 at 05:22:07PM +0200, Peter Krempa wrote:
>Rather than a lot of checks use a switch statement. This optimizes the
>code as if one device is matched the rest will certainly not match.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_domain.c | 77 ++++++++++++++++++++++++++++++++++----------------
> 1 file changed, 52 insertions(+), 25 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180524/166c3b64/attachment-0001.sig>


More information about the libvir-list mailing list