diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-03-09 03:23:05 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-03-09 03:23:05 +0000 |
commit | 6c12fc20d9c751a6e15752610b4d8a1b8e4c9a5b (patch) | |
tree | 1a8474ea31f7bdbe013e7a52b52d235265c2ec77 /firmware/powermgmt.c | |
parent | c7f4773cf64dae208a9614fcad0046456e9a87c6 (diff) | |
download | rockbox-6c12fc20d9c751a6e15752610b4d8a1b8e4c9a5b.tar.gz rockbox-6c12fc20d9c751a6e15752610b4d8a1b8e4c9a5b.zip |
Statically init array to 0 instead of runtime memset
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25085 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; | |||
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | /* Power history: power_history[0] is the newest sample */ | 96 | /* Power history: power_history[0] is the newest sample */ |
97 | unsigned short power_history[POWER_HISTORY_LEN]; | 97 | unsigned short power_history[POWER_HISTORY_LEN] = {0}; |
98 | 98 | ||
99 | #if CONFIG_CPU == JZ4732 /* FIXME! */ | 99 | #if CONFIG_CPU == JZ4732 /* FIXME! */ |
100 | static char power_stack[DEFAULT_STACK_SIZE + POWERMGMT_DEBUG_STACK]; | 100 | static char power_stack[DEFAULT_STACK_SIZE + POWERMGMT_DEBUG_STACK]; |
@@ -729,8 +729,6 @@ static void power_thread(void) | |||
729 | 729 | ||
730 | void powermgmt_init(void) | 730 | void powermgmt_init(void) |
731 | { | 731 | { |
732 | /* init history to 0 */ | ||
733 | memset(power_history, 0, sizeof(power_history)); | ||
734 | create_thread(power_thread, power_stack, sizeof(power_stack), 0, | 732 | create_thread(power_thread, power_stack, sizeof(power_stack), 0, |
735 | power_thread_name IF_PRIO(, PRIORITY_SYSTEM) | 733 | power_thread_name IF_PRIO(, PRIORITY_SYSTEM) |
736 | IF_COP(, CPU)); | 734 | IF_COP(, CPU)); |