qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vmstate: check subsection_found is enough


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] vmstate: check subsection_found is enough
Date: Tue, 2 Apr 2019 19:44:23 +0100
User-agent: Mutt/1.11.3 (2019-02-01)

* Wei Yang (address@hidden) wrote:
> subsection_found is true implies vmdesc is not NULL.
> 
> Signed-off-by: Wei Yang <address@hidden>
> ---
>  migration/vmstate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/vmstate.c b/migration/vmstate.c
> index e2bbb7b5f7..8327179eea 100644
> --- a/migration/vmstate.c
> +++ b/migration/vmstate.c
> @@ -533,7 +533,7 @@ static int vmstate_subsection_save(QEMUFile *f, const 
> VMStateDescription *vmsd,
>          sub++;
>      }
>  
> -    if (vmdesc && subsection_found) {
> +    if (subsection_found) {

That's true, however it's not obvious from the names; I think
we should probably rename 'subsection_found' to something like
'vmdesc_has_subsections'  then it's more obvious that subsection_found
is more specialised in this routine.

Dave


>          json_end_array(vmdesc);
>      }
>  
> -- 
> 2.19.1
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]