From: arighi Date: Thu, 28 Jan 2010 13:27:04 +0000 (+0000) Subject: Be sure to always initialize synctimer_list when synctimer_test is executed. X-Git-Tag: 2.4.0~56 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=e625f86da8895d66361e8d6f966ecfbd1138c206;p=bertos.git Be sure to always initialize synctimer_list when synctimer_test is executed. This fixes a SIGSEGV bug when the timer test is executed inside the BeRTOS emulator demo. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3168 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/timer_test.c b/bertos/drv/timer_test.c index c8ea23b8..6569781b 100644 --- a/bertos/drv/timer_test.c +++ b/bertos/drv/timer_test.c @@ -147,6 +147,7 @@ static void synctimer_test(void) { size_t i; + LIST_INIT(&synctimer_list); for (i = 0; i < countof(synctimer_timers); ++i) { Timer *timer = &synctimer_timers[i]; @@ -183,7 +184,6 @@ int timer_testSetup(void) IRQ_ENABLE; wdt_start(7); timer_init(); - LIST_INIT(&synctimer_list); kdbg_init(); return 0; }