block/vmdk: Fix warning from splint (comparision of unsigned value)
authorStefan Weil <sw@weilnetz.de>
Sat, 25 Feb 2012 13:01:42 +0000 (14:01 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 7 Mar 2012 13:03:51 +0000 (13:03 +0000)
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>
block/vmdk.c

index 5623ac10cde537a574f5ee054814e47ca5f8252b..45c003a0f193c233fd1643ce5277374251c02572 100644 (file)
@@ -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)