From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel@nongnu.org
Cc: Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH] wm8750: Fix calculation of number of array elements
Date: Mon, 9 Jan 2012 19:32:04 +0100 [thread overview]
Message-ID: <1326133924-1621-1-git-send-email-sw@weilnetz.de> (raw)
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
next reply other threads:[~2012-01-09 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 18:32 Stefan Weil [this message]
2012-01-10 17:46 ` [Qemu-devel] [PATCH] wm8750: Fix calculation of number of array elements andrzej zaborowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326133924-1621-1-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).