diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-08-03 15:24:41 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-08-03 18:00:53 +0300 |
commit | cb4b4fde82b064472c13fb9d983ca36a70e560aa (patch) | |
tree | 6209962580fb36edd2696fe8faa3df0314c5ef60 /hw/vhost.c | |
parent | 43e86c8f5b6d9f6279e20dede4e1f7829bdc43b7 (diff) | |
download | qemu-cb4b4fde82b064472c13fb9d983ca36a70e560aa.zip qemu-cb4b4fde82b064472c13fb9d983ca36a70e560aa.tar.gz qemu-cb4b4fde82b064472c13fb9d983ca36a70e560aa.tar.bz2 |
vhost: remove an incorrect assert
The 'to' can go negative when the first region gets removed
(it gets incremented by to 0 immediately afterward), which
makes the assertion fail. Nothing breaks if
to < 0 here so just remove the assert.
Tested-by: David Ahern <daahern@cisco.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/vhost.c')
-rw-r--r-- | hw/vhost.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -120,7 +120,6 @@ static void vhost_dev_unassign_memory(struct vhost_dev *dev, if (start_addr <= reg->guest_phys_addr && memlast >= reglast) { --dev->mem->nregions; --to; - assert(to >= 0); ++overlap_middle; continue; } |