projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e314672
)
vhost: readd assert statement
author
Michael S. Tsirkin
<mst@redhat.com>
Sun, 1 Apr 2012 08:39:43 +0000
(11:39 +0300)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 11 Apr 2012 10:19:32 +0000
(13:19 +0300)
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>
hw/vhost.c
patch
|
blob
|
history
diff --git
a/hw/vhost.c
b/hw/vhost.c
index 7e282dd3d5ec403da80ddfbd2d079cc1f7976af9..43664e7f4d8ac68b75b907ebce456ab2b817853f 100644
(file)
--- 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;