qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 17/26] progress: Allow regressing progress


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 17/26] progress: Allow regressing progress
Date: Wed, 03 Dec 2014 15:03:47 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/03/2014 05:37 AM, Max Reitz wrote:
> Progress may regress; this should be displayed correctly by
> qemu_progress_print().
> 
> While touching that area of code, drop the redundant parentheses in the
> same condition.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  util/qemu-progress.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/util/qemu-progress.c b/util/qemu-progress.c
> index 4ee5cd0..532333e 100644
> --- a/util/qemu-progress.c
> +++ b/util/qemu-progress.c
> @@ -152,7 +152,8 @@ void qemu_progress_print(float delta, int max)
>      state.current = current;
>  
>      if (current > (state.last_print + state.min_skip) ||
> -        (current == 100) || (current == 0)) {
> +        current < (state.last_print - state.min_skip) ||
> +        current == 100 || current == 0) {
>          state.last_print = state.current;
>          state.print();
>      }
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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