summaryrefslogtreecommitdiff
path: root/src/alarm.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-14 14:21:46 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-02-14 14:21:46 +0000
commit6b5befe9cde1a4c46bb0421cca9c659c732d40e1 (patch)
tree7c1ef1316af955597b5477af696e8e40521e26c9 /src/alarm.c
parentbc7329870e82a9909cfc01e4876ebcc5adeef629 (diff)
downloadconntrack-tools-6b5befe9cde1a4c46bb0421cca9c659c732d40e1.tar.gz
conntrack-tools-6b5befe9cde1a4c46bb0421cca9c659c732d40e1.zip
From: Max Kellermann <max@duempel.org>
use "for" loop instead of "while"
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);
}