From 6c12fc20d9c751a6e15752610b4d8a1b8e4c9a5b Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Tue, 9 Mar 2010 03:23:05 +0000 Subject: Statically init array to 0 instead of runtime memset git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25085 a1c6a512-1295-4272-9138-f99709370657 --- firmware/powermgmt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'firmware') diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 3f2b3c0f85..74564bd1a2 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -94,7 +94,7 @@ static int battery_type = 0; #endif /* Power history: power_history[0] is the newest sample */ -unsigned short power_history[POWER_HISTORY_LEN]; +unsigned short power_history[POWER_HISTORY_LEN] = {0}; #if CONFIG_CPU == JZ4732 /* FIXME! */ static char power_stack[DEFAULT_STACK_SIZE + POWERMGMT_DEBUG_STACK]; @@ -729,8 +729,6 @@ static void power_thread(void) void powermgmt_init(void) { - /* init history to 0 */ - memset(power_history, 0, sizeof(power_history)); create_thread(power_thread, power_stack, sizeof(power_stack), 0, power_thread_name IF_PRIO(, PRIORITY_SYSTEM) IF_COP(, CPU)); -- cgit v1.2.3