mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 13:38:36 -07:00
qemu-file: Only set last_error if it is not already set
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
1e973051b9
commit
afe419319d
1 changed files with 3 additions and 1 deletions
4
savevm.c
4
savevm.c
|
|
@ -419,7 +419,9 @@ int qemu_file_get_error(QEMUFile *f)
|
|||
|
||||
static void qemu_file_set_error(QEMUFile *f, int ret)
|
||||
{
|
||||
f->last_error = ret;
|
||||
if (f->last_error == 0) {
|
||||
f->last_error = ret;
|
||||
}
|
||||
}
|
||||
|
||||
/** Flushes QEMUFile buffer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue