aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-01-09 19:32:04 +0100
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>2012-01-10 18:47:06 +0100
commit9841aee16f1e68f5a9063589c898c40b44473add (patch)
tree932f157c87f4763c689dea622bf12a647afadd0a
parentc7c530cd3e23219a9be10323ba7876f68d54c107 (diff)
downloadqemu-9841aee16f1e68f5a9063589c898c40b44473add.zip
qemu-9841aee16f1e68f5a9063589c898c40b44473add.tar.gz
qemu-9841aee16f1e68f5a9063589c898c40b44473add.tar.bz2
wm8750: Fix calculation of number of array elements
Coverity says that the division by sizeof(*s->rate) might be wrong. I think that coverity is right. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
-rw-r--r--hw/wm8750.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/wm8750.c b/hw/wm8750.c
index 39383f4..9fbdf3d 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)