Merge pull request #858 from simonduq/cleanup-ctimer

Remove unnecessary list_remove in ctimer.c (list_add automatically remov...
This commit is contained in:
Nicolas Tsiftes 2014-11-18 08:59:41 +01:00
commit eb0676212c

View File

@ -111,7 +111,6 @@ ctimer_set(struct ctimer *c, clock_time_t t,
c->etimer.timer.interval = t; c->etimer.timer.interval = t;
} }
list_remove(ctimer_list, c);
list_add(ctimer_list, c); list_add(ctimer_list, c);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -124,7 +123,6 @@ ctimer_reset(struct ctimer *c)
PROCESS_CONTEXT_END(&ctimer_process); PROCESS_CONTEXT_END(&ctimer_process);
} }
list_remove(ctimer_list, c);
list_add(ctimer_list, c); list_add(ctimer_list, c);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -137,7 +135,6 @@ ctimer_restart(struct ctimer *c)
PROCESS_CONTEXT_END(&ctimer_process); PROCESS_CONTEXT_END(&ctimer_process);
} }
list_remove(ctimer_list, c);
list_add(ctimer_list, c); list_add(ctimer_list, c);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/