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

Jiri Denemark jdenemar at redhat.com
Wed Feb 3 09:29:16 UTC 2016


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 at virtuozzo.com>
> ---
>  src/qemu/qemu_driver.c | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)

ACK and pushed, thanks.

Jirka




More information about the libvir-list mailing list