提交 fbbaf9ae 编写于 作者: M Michael S. Tsirkin

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: NMichael S. Tsirkin <mst@redhat.com>
上级 e314672a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册