diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-10-08 16:08:35 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-10-08 16:08:35 +0100 |
commit | 98b2e3c9ab3abfe476a2b02f8f51813edb90e72d (patch) | |
tree | 6f5e6f655ab683e486745b2db868f2e11979864b /util | |
parent | 14d40ab1d55e54a87350d44769152dd7a59a7b42 (diff) | |
parent | 4d804b5305ffb4d5fa414c38d4f1bdfb987c8d0b (diff) | |
download | qemu-98b2e3c9ab3abfe476a2b02f8f51813edb90e72d.zip qemu-98b2e3c9ab3abfe476a2b02f8f51813edb90e72d.tar.gz qemu-98b2e3c9ab3abfe476a2b02f8f51813edb90e72d.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
This pull request also contains the two commits from the previous pull request
that was dropped due to a mingw compilation error. The compilation should now
be fixed.
# gpg: Signature made Tue 08 Oct 2019 15:54:26 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
iotests/262: Switch source/dest VM launch order
block: Skip COR for inactive nodes
virtio-blk: schedule virtio_notify_config to run on main context
util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/iov.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -423,7 +423,7 @@ void qemu_iovec_init_extended( { size_t mid_head, mid_tail; int total_niov, mid_niov = 0; - struct iovec *p, *mid_iov; + struct iovec *p, *mid_iov = NULL; if (mid_len) { mid_iov = qiov_slice(mid_qiov, mid_offset, mid_len, @@ -446,7 +446,8 @@ void qemu_iovec_init_extended( p++; } - if (mid_len) { + assert(!mid_niov == !mid_len); + if (mid_niov) { memcpy(p, mid_iov, mid_niov * sizeof(*p)); p[0].iov_base = (uint8_t *)p[0].iov_base + mid_head; p[0].iov_len -= mid_head; |