* [Qemu-devel] [PATCH] block/vmdk: Fix warning from splint (comparision of unsigned value)
@ 2012-02-25 13:01 Stefan Weil
2012-03-05 13:11 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2012-02-25 13:01 UTC (permalink / raw)
To: QEMU Trivial; +Cc: Stefan Weil, qemu-devel
l1_entry_sectors will never be less than 0.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block/vmdk: Fix warning from splint (comparision of unsigned value)
2012-02-25 13:01 [Qemu-devel] [PATCH] block/vmdk: Fix warning from splint (comparision of unsigned value) Stefan Weil
@ 2012-03-05 13:11 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2012-03-05 13:11 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Trivial, qemu-devel
On Sat, Feb 25, 2012 at 02:01:42PM +0100, Stefan Weil wrote:
> l1_entry_sectors will never be less than 0.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> block/vmdk.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-05 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-25 13:01 [Qemu-devel] [PATCH] block/vmdk: Fix warning from splint (comparision of unsigned value) Stefan Weil
2012-03-05 13:11 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).