mirror of https://github.com/xqemu/xqemu.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 <mst@redhat.com>
This commit is contained in:
parent
e314672a8a
commit
fbbaf9ae88
|
@ -35,6 +35,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert(end / VHOST_LOG_CHUNK < dev->log_size);
|
assert(end / VHOST_LOG_CHUNK < dev->log_size);
|
||||||
|
assert(start / VHOST_LOG_CHUNK < dev->log_size);
|
||||||
|
|
||||||
for (;from < to; ++from) {
|
for (;from < to; ++from) {
|
||||||
vhost_log_chunk_t log;
|
vhost_log_chunk_t log;
|
||||||
|
|
Loading…
Reference in New Issue