diff options
author | Juan Quintela <quintela@redhat.com> | 2013-01-14 13:36:28 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-01-17 13:54:16 +0100 |
commit | afe419319de1e5e98b131368ba14f85f98ab3a76 (patch) | |
tree | 2a826581351f961ec5e3ac90c0cd3644bbfcfd47 /savevm.c | |
parent | 1e973051b96bac5eef46393eec15b68796e7c7d3 (diff) |
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>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |