Received: from eggs.gnu.org ([208.118.235.92]:37483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1HG2-0007eV-FM for qemu-devel@nongnu.org; Sat, 25 Feb 2012 08:01:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1HFx-0007B2-Hz for qemu-devel@nongnu.org; Sat, 25 Feb 2012 08:01:50 -0500 From: Stefan Weil Date: Sat, 25 Feb 2012 14:01:42 +0100 Message-Id: <1330174902-12364-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] block/vmdk: Fix warning from splint (comparision of unsigned value) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Trivial Cc: Stefan Weil , qemu-devel@nongnu.org l1_entry_sectors will never be less than 0. Signed-off-by: Stefan Weil --- block/vmdk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 5623ac1..45c003a 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) -- 1.7.9