提交 4798fe55 编写于 作者: C Chen Gang 提交者: Michael Tokarev

arch_init: Be sure of only one exit entry with DPRINTF() for ram_load()

When DPRINTF() has effect, the original author wants to print all
ram_load() calling results. So need use 'goto' instead of 'return'
within ram_load(), just like other areas have done.
Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 ad0a118f
......@@ -1036,7 +1036,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
seq_iter++;
if (version_id != 4) {
return -EINVAL;
ret = -EINVAL;
goto done;
}
do {
......@@ -1091,7 +1092,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
host = host_from_stream_offset(f, addr, flags);
if (!host) {
return -EINVAL;
ret = -EINVAL;
goto done;
}
ch = qemu_get_byte(f);
......@@ -1101,14 +1103,16 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
host = host_from_stream_offset(f, addr, flags);
if (!host) {
return -EINVAL;
ret = -EINVAL;
goto done;
}
qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
} else if (flags & RAM_SAVE_FLAG_XBZRLE) {
void *host = host_from_stream_offset(f, addr, flags);
if (!host) {
return -EINVAL;
ret = -EINVAL;
goto done;
}
if (load_xbzrle(f, addr, host) < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册