From: Michael S. Tsirkin Date: Sun, 1 Apr 2012 08:39:43 +0000 (+0300) Subject: vhost: readd assert statement X-Git-Tag: v1.1-rc0~95^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbbaf9ae88286f18b2ab32fb4174ebdbdc1d5919;p=thirdparty%2Fqemu.git 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 --- diff --git a/hw/vhost.c b/hw/vhost.c index 7e282dd3d5e..43664e7f4d8 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;