summaryrefslogtreecommitdiffstats
path: root/src/alarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alarm.c')
-rw-r--r--src/alarm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/alarm.c b/src/alarm.c
index 470efdd..a3bdbe2 100644
--- a/src/alarm.c
+++ b/src/alarm.c
@@ -128,15 +128,12 @@ do_alarm_run(struct timeval *next_run)
gettimeofday(&tv, NULL);
- node = rb_first(&alarm_root);
- while (node) {
+ for (node = rb_first(&alarm_root); node; node = rb_next(node)) {
this = container_of(node, struct alarm_block, node);
if (timercmp(&this->tv, &tv, >))
break;
- node = rb_next(node);
-
list_add(&this->list, &alarm_run_queue);
}