From 6b5befe9cde1a4c46bb0421cca9c659c732d40e1 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Thu, 14 Feb 2008 14:21:46 +0000 Subject: From: Max Kellermann use "for" loop instead of "while" --- src/alarm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/alarm.c') 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); } -- cgit v1.2.3