diff options
author | Wangting (Kathy) <kathy.wangting@huawei.com> | 2013-11-19 05:53:45 +0000 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2013-11-20 12:16:04 +0100 |
commit | 8e86729a0e83b557c22808a2337252c969ca3986 (patch) | |
tree | e963b562a7e7abdc19a932c7777dc8d68c3b865c | |
parent | 394cfa39ba24dd838ace1308ae24961243947fb8 (diff) | |
download | qemu-8e86729a0e83b557c22808a2337252c969ca3986.zip qemu-8e86729a0e83b557c22808a2337252c969ca3986.tar.gz qemu-8e86729a0e83b557c22808a2337252c969ca3986.tar.bz2 |
The calculation of bytes_xfer in qemu_put_buffer() is wrong
In qemu_put_buffer(), bytes_xfer += size is wrong, it will be more
than expected, and should be bytes_xfer += l.
Signed-off-by: zhangmin <zhangmin6@huawei.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r-- | savevm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -794,7 +794,7 @@ void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size) if (l > size) l = size; memcpy(f->buf + f->buf_index, buf, l); - f->bytes_xfer += size; + f->bytes_xfer += l; if (f->ops->writev_buffer) { add_to_iovec(f, f->buf + f->buf_index, l); } |