savevm: make qemu_fill_buffer() be consistent

It was setting last_error directly once, and with the helper the other time.

Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Juan Quintela 2012-08-29 19:36:26 +02:00
parent 3aee4be1de
commit 02c4a0511b

View File

@ -501,7 +501,7 @@ static void qemu_fill_buffer(QEMUFile *f)
f->buf_size += len;
f->buf_offset += len;
} else if (len == 0) {
f->last_error = -EIO;
qemu_file_set_error(f, -EIO);
} else if (len != -EAGAIN)
qemu_file_set_error(f, len);
}