diff options
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:25:11 +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:25:11 +0000 |
commit | a293fcbc5df63a4867e1cff637b5935c267f5da0 (patch) | |
tree | 32cbe3b9dee92acafdf3116a5dc4062ba24dc637 /src/alarm.c | |
parent | 4590cc9638d39cd189724915fc3d4763a52eb934 (diff) | |
download | conntrack-tools-a293fcbc5df63a4867e1cff637b5935c267f5da0.tar.gz conntrack-tools-a293fcbc5df63a4867e1cff637b5935c267f5da0.zip |
From: Max Kellermann <max@duempel.org>
use list_for_each_entry()
Diffstat (limited to 'src/alarm.c')
-rw-r--r-- | src/alarm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/alarm.c b/src/alarm.c index c86ce44..8056ee6 100644 --- a/src/alarm.c +++ b/src/alarm.c @@ -123,7 +123,7 @@ do_alarm_run(struct timeval *next_run) { struct list_head alarm_run_queue; struct rb_node *node; - struct alarm_block *this, *tmp; + struct alarm_block *this; struct timeval tv; gettimeofday(&tv, NULL); @@ -138,8 +138,7 @@ do_alarm_run(struct timeval *next_run) list_add(&this->list, &alarm_run_queue); } - list_for_each_entry_safe(this, tmp, &alarm_run_queue, list) { - list_del(&this->list); + list_for_each_entry(this, &alarm_run_queue, list) { rb_erase(&this->node, &alarm_root); RB_CLEAR_NODE(&this->node); this->function(this, this->data); |