[libvirt] [PATCHv2 1/3] qemu: Refactor qemuDomainSetVcpusFlags

Eric Blake eblake at redhat.com
Fri May 11 14:08:58 UTC 2012


On 05/11/2012 07:23 AM, Peter Krempa wrote:
> This patch changes a switch statement into ifs when handling live vs.
> configuration modifications getting rid of redundant code in case when
> both live and persistent configuration gets changed.
> ---
> Diff to v1:
> - change order of live and config modifications - do the live modification first
> ---
>  src/qemu/qemu_driver.c |   26 +++++++++-----------------
>  1 files changed, 9 insertions(+), 17 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index c9e047e..b283c8c 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -3463,33 +3463,25 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
>          goto endjob;
>      }
> 
> -    switch (flags) {
> -    case VIR_DOMAIN_AFFECT_CONFIG:
> +   if (flags & VIR_DOMAIN_AFFECT_LIVE) {

Indentation off by one.

ACK with that fix.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120511/c5636d88/attachment-0001.sig>


More information about the libvir-list mailing list