aboutsummaryrefslogtreecommitdiff
path: root/hw/timer/altera_timer.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-05-18 12:33:34 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2017-06-04 18:42:55 +0300
commitcc16ee9d4ecec35ea04eb5e44430207a447757ce (patch)
treed92180acccc51bfb4371d48c957c1e8c7e9da427 /hw/timer/altera_timer.c
parent271f37abb510607ca7650e40951284692a67579a (diff)
downloadqemu-cc16ee9d4ecec35ea04eb5e44430207a447757ce.zip
qemu-cc16ee9d4ecec35ea04eb5e44430207a447757ce.tar.gz
qemu-cc16ee9d4ecec35ea04eb5e44430207a447757ce.tar.bz2
altera_timer: fix incorrect memset
Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent GCC versions. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/timer/altera_timer.c')
-rw-r--r--hw/timer/altera_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/timer/altera_timer.c b/hw/timer/altera_timer.c
index 6d48626..c9a0fc5 100644
--- a/hw/timer/altera_timer.c
+++ b/hw/timer/altera_timer.c
@@ -204,7 +204,7 @@ static void altera_timer_reset(DeviceState *dev)
ptimer_stop(t->ptimer);
ptimer_set_limit(t->ptimer, 0xffffffff, 1);
- memset(t->regs, 0, ARRAY_SIZE(t->regs));
+ memset(t->regs, 0, sizeof(t->regs));
}
static Property altera_timer_properties[] = {