45949aa942
Fix for issue which affects openQA OBS-URL: https://build.opensuse.org/request/show/506218 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=346
29 lines
932 B
Diff
29 lines
932 B
Diff
From ac31e9efbe92ee16903a446db4faa14f28e8a9b8 Mon Sep 17 00:00:00 2001
|
|
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
Date: Mon, 22 May 2017 17:46:40 -0600
|
|
Subject: [PATCH] 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>
|
|
[LY: BSC#1040228]
|
|
Signed-off-by: Liang Yan <lyan@suse.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[] = {
|