From e625f86da8895d66361e8d6f966ecfbd1138c206 Mon Sep 17 00:00:00 2001 From: arighi Date: Thu, 28 Jan 2010 13:27:04 +0000 Subject: [PATCH] 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 --- bertos/drv/timer_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1