diff gsm-fw/gpf/osl/os_tim_ir.c @ 467:aa9aec3ba437

os_tim_ir.c: os_add_timer_to_list(): minor polish
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 26 Jun 2014 05:49:59 +0000
parents d43bf2d301de
children 6389bfe95f23
line wrap: on
line diff
--- a/gsm-fw/gpf/osl/os_tim_ir.c	Thu Jun 26 05:08:44 2014 +0000
+++ b/gsm-fw/gpf/osl/os_tim_ir.c	Thu Jun 26 05:49:59 2014 +0000
@@ -143,7 +143,8 @@
 	return 1;
 }
 
-static unsigned os_add_timer_to_list(T_OS_TIMER_TABLE_ENTRY *timer, OS_TICK ticks)
+static unsigned
+os_add_timer_to_list(T_OS_TIMER_TABLE_ENTRY *timer, OS_TICK ticks)
 {
 	T_OS_TIMER_TABLE_ENTRY *t_list;
 	OS_TICK c_ticks, r1_ticks, return_ticks;
@@ -154,13 +155,12 @@
 	c_ticks = NU_Retrieve_Clock();
 	t_list = t_running;
 	if (t_list != NULL) {
-		if (t_running->r_ticks >= c_ticks - t_start_ticks) {
-			r1_ticks =
-			    t_running->r_ticks - c_ticks + t_start_ticks;
-			t_running->r_ticks = r1_ticks;
+		if (t_list->r_ticks >= c_ticks - t_start_ticks) {
+			r1_ticks = t_list->r_ticks - c_ticks + t_start_ticks;
+			t_list->r_ticks = r1_ticks;
 		} else {
 			r1_ticks = 0;
-			t_running->r_ticks = 0;
+			t_list->r_ticks = 0;
 		}
 		t_start_ticks = c_ticks;
 		return_ticks = 0;