qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_f


From: Lei Li
Subject: Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit
Date: Fri, 23 Aug 2013 17:25:41 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 08/23/2013 05:22 PM, Paolo Bonzini wrote:
Il 23/08/2013 11:18, Lei Li ha scritto:
And now as qemu_file_rate_limit() never return negative value, what's
the
meaning for the check: if (qemu_file_rate_limit(f) < 0) in
ram_save_iterate()?
I only see a "while ((ret = qemu_file_rate_limit(f)) == 0)", no
less-than-zero check.

Are we looking at the same code? :)
I think so, hehe.
You might want to look a little more. After the while(..), there is a
check:

if (ret < 0) {
     bytes_transferred += total_sent;
     return ret;
}
Aha, there you are.  It's dead code, you can delete it.

Sure, I will send it along with other two patches you reviewed positively. :)


Paolo



--
Lei




reply via email to

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