Commit afe41931 authored by Juan Quintela's avatar Juan Quintela
Browse files

qemu-file: Only set last_error if it is not already set


Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
Reviewed-by: default avatarReviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 1e973051
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment