From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fPo-0000NK-9j for qemu-devel@nongnu.org; Thu, 08 Mar 2012 10:38:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5fPO-0001WM-09 for qemu-devel@nongnu.org; Thu, 08 Mar 2012 10:38:03 -0500 Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:48409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5fPN-0001Vb-NL for qemu-devel@nongnu.org; Thu, 08 Mar 2012 10:37:37 -0500 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Mar 2012 15:37:33 -0000 Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q28FbVSD2228340 for ; Thu, 8 Mar 2012 15:37:31 GMT Received: from d06av10.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q281TKPM002148 for ; Wed, 7 Mar 2012 20:29:20 -0500 From: Stefan Hajnoczi Date: Thu, 8 Mar 2012 15:37:14 +0000 Message-Id: <1331221041-4710-5-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1331221041-4710-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1331221041-4710-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 04/11] block/vmdk: Fix warning from splint (comparision of unsigned value) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Stefan Weil , qemu-devel@nongnu.org, Stefan Hajnoczi From: Stefan Weil l1_entry_sectors will never be less than 0. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- 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.1