mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 17:11:57 -06:00
qemu-file: Remove total from qemu_file_total_transferred_*()
Function is already quite long. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230508130909.65420-7-quintela@redhat.com>
This commit is contained in:
parent
f87e4d6d43
commit
6da835d42a
6 changed files with 15 additions and 16 deletions
|
@ -361,7 +361,7 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
void *curr_elem = first_elem + size * i;
|
||||
|
||||
vmsd_desc_field_start(vmsd, vmdesc_loop, field, i, n_elems);
|
||||
old_offset = qemu_file_total_transferred_fast(f);
|
||||
old_offset = qemu_file_transferred_fast(f);
|
||||
if (field->flags & VMS_ARRAY_OF_POINTER) {
|
||||
assert(curr_elem);
|
||||
curr_elem = *(void **)curr_elem;
|
||||
|
@ -391,8 +391,7 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
written_bytes = qemu_file_total_transferred_fast(f) -
|
||||
old_offset;
|
||||
written_bytes = qemu_file_transferred_fast(f) - old_offset;
|
||||
vmsd_desc_field_end(vmsd, vmdesc_loop, field, written_bytes, i);
|
||||
|
||||
/* Compressed arrays only care about the first element */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue