block/vmdk: Fix warning from splint (comparision of unsigned value)

l1_entry_sectors will never be less than 0.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
Stefan Weil 2012-02-25 14:01:42 +01:00 committed by Stefan Hajnoczi
parent beae9d7990
commit 75d1234103

View File

@ -453,7 +453,7 @@ static int vmdk_open_vmdk4(BlockDriverState *bs,
} }
l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte) l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte)
* le64_to_cpu(header.granularity); * le64_to_cpu(header.granularity);
if (l1_entry_sectors <= 0) { if (l1_entry_sectors == 0) {
return -EINVAL; return -EINVAL;
} }
l1_size = (le64_to_cpu(header.capacity) + l1_entry_sectors - 1) l1_size = (le64_to_cpu(header.capacity) + l1_entry_sectors - 1)