From 9841aee16f1e68f5a9063589c898c40b44473add Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 9 Jan 2012 19:32:04 +0100 Subject: 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 Signed-off-by: Andrzej Zaborowski --- hw/wm8750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/wm8750.c b/hw/wm8750.c index 39383f43e5..9fbdf3d54b 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) -- cgit v1.2.3