aboutsummaryrefslogtreecommitdiff
path: root/block/vmdk.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-03-09 12:30:20 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-09 12:30:20 -0600
commitdac6b1b22cbad29ca34735a1e56c9feb9586e3c0 (patch)
tree3691bc37b70059c458ad7b5972ff756be56a6a9d /block/vmdk.c
parentbf75fec175d00885c7ae06e5917bde86110c386a (diff)
parent979ae168e5fac830fcf8ca63fed732051af0611a (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: configure: Quote the configure args printed in config.log osdep: Remove local definition of macro offsetof libcacard: Spelling and grammar fixes in documentation Spelling fixes in comments (it's -> its) vnc: Add break statement libcacard: Use format specifier %u instead of %d for unsigned values Fix sign of sscanf format specifiers block/vmdk: Fix warning from splint (comparision of unsigned value) qmp: Fix spelling fourty -> forty qom: Fix spelling in documentation sh7750: Remove redundant 'struct' from MemoryRegionOps
Diffstat (limited to 'block/vmdk.c')
-rw-r--r--block/vmdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index 5623ac10cd..45c003a0f1 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -453,7 +453,7 @@ static int vmdk_open_vmdk4(BlockDriverState *bs,
}
l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte)
* le64_to_cpu(header.granularity);
- if (l1_entry_sectors <= 0) {
+ if (l1_entry_sectors == 0) {
return -EINVAL;
}
l1_size = (le64_to_cpu(header.capacity) + l1_entry_sectors - 1)