[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]