aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorChen Qun <kuhn.chenqun@huawei.com>2020-02-26 16:46:44 +0800
committerJuan Quintela <quintela@redhat.com>2020-02-28 09:25:49 +0100
commit600fe89d6e627a18a01f4b7aef15d84efdb81548 (patch)
tree66b2a56032edbb33c4504b45096cf1a25e632cc3 /migration
parent87dc6f5f665f581923536a1346220c7dcebe5105 (diff)
downloadqemu-600fe89d6e627a18a01f4b7aef15d84efdb81548.zip
qemu-600fe89d6e627a18a01f4b7aef15d84efdb81548.tar.gz
qemu-600fe89d6e627a18a01f4b7aef15d84efdb81548.tar.bz2
migration/vmstate: Remove redundant statement in vmstate_save_state_v()
The "ret" has been assigned in all branches. It didn't need to be assigned separately. Clang static code analyzer show warning: migration/vmstate.c:365:17: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/vmstate.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 7dd8ef6..bafa890 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -362,7 +362,6 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
}
for (i = 0; i < n_elems; i++) {
void *curr_elem = first_elem + size * i;
- ret = 0;
vmsd_desc_field_start(vmsd, vmdesc_loop, field, i, n_elems);
old_offset = qemu_ftell_fast(f);