qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] altera_timer: fix incorrect memset
@ 2017-05-18 10:33 Paolo Bonzini
  2017-05-18 15:00 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
  2017-05-23 14:44 ` [Qemu-devel] " Michael Tokarev
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2017-05-18 10:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent
GCC versions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/timer/altera_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/timer/altera_timer.c b/hw/timer/altera_timer.c
index 6d4862661d..c9a0fc5dca 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[] = {
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-23 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 10:33 [Qemu-devel] [PATCH] altera_timer: fix incorrect memset Paolo Bonzini
2017-05-18 15:00 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2017-05-23 14:44 ` [Qemu-devel] " Michael Tokarev

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).