Skip to contentSkip to conversation

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

PATCH Applied Stefan Weil 2 participants 2 messages Feb 25, 2012 – Mar 5, 2012 Block layer

lore
Share & tools
lore
#0 lore raw

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

l1_entry_sectors will never be less than 0.

---
 block/vmdk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/vmdk.c +1 -1
index 5623ac1..45c003a 100644
@@ -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)
Signature · 1 line
1.7.9