[PATCH v2 8/8] domain_conf: rewrite variable setting

Martin Kletzander mkletzan at redhat.com
Thu Jul 21 15:14:11 UTC 2022


On Thu, Jul 21, 2022 at 12:45:53PM +0200, Kristina Hanicova wrote:
>Signed-off-by: Kristina Hanicova <khanicov at redhat.com>

Reviewed-by: Martin Kletzander <mkletzan at redhat.com>

>---
> src/conf/domain_conf.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index bbe6574487..d3872830c9 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -4216,12 +4216,8 @@ virDomainObjGetOneDefState(virDomainObj *vm,
>     if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
>         return NULL;
>
>-    if (live) {
>-        if (flags & VIR_DOMAIN_AFFECT_LIVE)
>-            *live = true;
>-        else
>-            *live = false;
>-    }
>+    if (live)
>+        *live = flags & VIR_DOMAIN_AFFECT_LIVE;
>
>     if (virDomainObjIsActive(vm) && flags & VIR_DOMAIN_AFFECT_CONFIG)
>         return vm->newDef;
>-- 
>2.35.3
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220721/4ba33d86/attachment-0001.sig>


More information about the libvir-list mailing list