[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 07/22] altera_timer: fix incorrect memset
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 07/22] altera_timer: fix incorrect memset |
Date: |
Sun, 4 Jun 2017 18:45:11 +0300 |
From: Paolo Bonzini <address@hidden>
Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent
GCC versions.
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
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.11.0
- [Qemu-trivial] [PULL 00/22] Trivial patches for 2017-06-04, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 08/22] trivial: Remove unneeded ifndef in memory.h, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 02/22] qemu-doc: Add hyperlinks to further license information, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 10/22] target/arm: add data cache invalidation cp15 instruction to cortex-r5, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 05/22] tests/libqtest: Print error instead of aborting when env variable is missing, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 07/22] altera_timer: fix incorrect memset,
Michael Tokarev <=
- [Qemu-trivial] [PULL 17/22] qemu-ga: remove useless allocation, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 14/22] hw/mips: add missing include, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 11/22] hw/xtensa: sim: use g_string/g_new, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 01/22] qemu-doc: Move the qemu-ga description into a separate chapter, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 19/22] ide-test: check return of fwrite, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 22/22] hw/core: nmi.c can be compiled as common-obj nowadays, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 04/22] docs/qdev-device-use.txt: update section Default Devices, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 03/22] docs qemu-doc: Avoid ide-drive, it's deprecated, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 20/22] dump: fix memory_mapping_filter leak, Michael Tokarev, 2017/06/04
- [Qemu-trivial] [PULL 15/22] qapi: Fix some QMP documentation regressions, Michael Tokarev, 2017/06/04