diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2012-04-01 11:39:43 +0300 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2012-04-11 13:19:32 +0300 |
| commit | fbbaf9ae88286f18b2ab32fb4174ebdbdc1d5919 (patch) | |
| tree | 7ec7b5b2c887664368b932469e8f030983042cc0 | |
| parent | e314672a8a95f5dc98534f0682fce50fb83dbc5c (diff) | |
| download | focaccia-qemu-fbbaf9ae88286f18b2ab32fb4174ebdbdc1d5919.tar.gz focaccia-qemu-fbbaf9ae88286f18b2ab32fb4174ebdbdc1d5919.zip | |
vhost: readd assert statement
It's clear from the surrounding code that start < end so it's enough to assert end < log_size. However, it's better to make this explicit in case we refactor the code again. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| -rw-r--r-- | hw/vhost.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vhost.c b/hw/vhost.c index 7e282dd3d5..43664e7f4d 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -35,6 +35,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, return; } assert(end / VHOST_LOG_CHUNK < dev->log_size); + assert(start / VHOST_LOG_CHUNK < dev->log_size); for (;from < to; ++from) { vhost_log_chunk_t log; |