mirror of https://github.com/xemu-project/xemu.git
migration: remove duplicate code
version_id is checked twice in the ram_load. Signed-off-by: ChenLiang <chenliang88@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
d99598cc99
commit
21a246a43b
|
@ -1010,7 +1010,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
|
||||
seq_iter++;
|
||||
|
||||
if (version_id < 4 || version_id > 4) {
|
||||
if (version_id != 4) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1021,7 +1021,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
addr &= TARGET_PAGE_MASK;
|
||||
|
||||
if (flags & RAM_SAVE_FLAG_MEM_SIZE) {
|
||||
if (version_id == 4) {
|
||||
/* Synchronize RAM block list */
|
||||
char id[256];
|
||||
ram_addr_t length;
|
||||
|
@ -1060,7 +1059,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
total_ram_bytes -= length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & RAM_SAVE_FLAG_COMPRESS) {
|
||||
void *host;
|
||||
|
|
Loading…
Reference in New Issue