timer: Simplify osmo_timers_nearest even more

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2011-10-18 20:11:03 +02:00
parent 955fdb039e
commit 0061dedaae
1 changed files with 4 additions and 4 deletions

View File

@ -132,10 +132,10 @@ int osmo_timer_pending(struct osmo_timer_list *timer)
*/
struct timeval *osmo_timers_nearest(void)
{
if (nearest_p != NULL)
return nearest_p;
else
return NULL;
/* nearest_p is exactly what we need already: NULL if nothing is
* waiting, {0,0} if we must dispatch immediately, and the correct
* delay if we need to wait */
return nearest_p;
}
static void update_nearest(struct timeval *cand, struct timeval *current)