domain_conf: rewrite variable setting

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Kristina Hanicova 2022-07-21 12:45:53 +02:00 committed by Martin Kletzander
parent bad1206ce9
commit ff35ce0b5b

View File

@ -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;