Re: [PATCH v3] qemu: return -1 on error paths in qemuDomainSaveImageStartVM

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

 



On Mon, Feb 01, 2016 at 16:28:40 +0300, Nikolay Shirokovskiy wrote:
> Error paths after sending the event that domain is started written as if ret = -1
> which is set at the beginning of the function. It's common idioma to keep 'ret'
> equal to -1 until the end of function where it is set to 0. But here we use ret
> to keep result of restore operation too and thus breaks the idioma and its users :)
> 
> Let's use different variable to hold restore result.
> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)

ACK and pushed, thanks.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]