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>
This commit is contained in:
Michael S. Tsirkin
2012-04-11 13:19:32 +03:00
parent e314672a8a
commit fbbaf9ae88
+1
View File
@@ -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;