[libvirt] [PATCH v2 1/4] domain config: reduce nesting

Nikolay Shirokovskiy nshirokovskiy at virtuozzo.com
Wed Feb 24 08:46:01 UTC 2016


Please, disregard this. It's version of the other 1/4 patch which differs only in
commit message.

On 24.02.2016 11:38, Nikolay Shirokovskiy wrote:
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy at virtuozzo.com>
> ---
>  src/conf/domain_conf.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 0d2957b..d6c33f6 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -2872,13 +2872,11 @@ virDomainObjUpdateModificationImpact(virDomainObjPtr vm,
>          return -1;
>      }
>  
> -    if (*flags & VIR_DOMAIN_AFFECT_CONFIG) {
> -        if (!vm->persistent) {
> -            virReportError(VIR_ERR_OPERATION_INVALID, "%s",
> -                           _("transient domains do not have any "
> -                             "persistent config"));
> -            return -1;
> -        }
> +    if (!vm->persistent && (*flags & VIR_DOMAIN_AFFECT_CONFIG)) {
> +        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
> +                       _("transient domains do not have any "
> +                         "persistent config"));
> +        return -1;
>      }
>  
>      return 0;
> 




More information about the libvir-list mailing list