mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
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;
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user