提交 cc16ee9d 编写于 作者: P Paolo Bonzini 提交者: Michael Tokarev

altera_timer: fix incorrect memset

Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent
GCC versions.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 271f37ab
......@@ -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[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册