summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2011-10-18 20:11:03 +0200
committerSylvain Munaut <tnt@246tNt.com>2011-10-18 20:11:03 +0200
commit0061dedaae41b117115bab4bd00e9dddb85bbe66 (patch)
tree64e69a2be7bd50581dff3ebc8406400dfd5fb839
parent955fdb039e7ac18322bc37e411c216702fb158a3 (diff)
timer: Simplify osmo_timers_nearest even more
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--src/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/timer.c b/src/timer.c
index d1a4e7e0..da16459c 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -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)