* [Qemu-devel] [PATCH] wm8750: Fix calculation of number of array elements
@ 2012-01-09 18:32 Stefan Weil
2012-01-10 17:46 ` andrzej zaborowski
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2012-01-09 18:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Weil
Coverity says that the division by sizeof(*s->rate) might be wrong.
I think that coverity is right.
Cc: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
hw/wm8750.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/wm8750.c b/hw/wm8750.c
index 39383f4..b3589d3 100644
--- a/hw/wm8750.c
+++ b/hw/wm8750.c
@@ -563,7 +563,7 @@ static void wm8750_pre_save(void *opaque)
{
WM8750State *s = opaque;
- s->rate_vmstate = (s->rate - wm_rate_table) / sizeof(*s->rate);
+ s->rate_vmstate = s->rate - wm_rate_table;
}
static int wm8750_post_load(void *opaque, int version_id)
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-10 17:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 18:32 [Qemu-devel] [PATCH] wm8750: Fix calculation of number of array elements Stefan Weil
2012-01-10 17:46 ` andrzej zaborowski
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).