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-01-22 01:32:21 +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-01-22 01:32:21 +0000 |
commit | 8078747751df6e8ccc27b76f2f53c5e393d745ae (patch) | |
tree | afb4e85d99f7cf6ecc0111a7a353cfb370e2c4a2 | |
parent | 02ff145c51439873db3cdc192b48e47e2272b0b9 (diff) | |
download | conntrack-tools-8078747751df6e8ccc27b76f2f53c5e393d745ae.tar.gz conntrack-tools-8078747751df6e8ccc27b76f2f53c5e393d745ae.zip |
remove alarm counter
-rw-r--r-- | include/alarm.h | 2 | ||||
-rw-r--r-- | src/alarm.c | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/include/alarm.h b/include/alarm.h index 3569025..c4ea9d7 100644 --- a/include/alarm.h +++ b/include/alarm.h @@ -5,8 +5,6 @@ #include <sys/time.h> -extern int alarm_counter; - struct alarm_list { struct list_head head; struct timeval tv; diff --git a/src/alarm.c b/src/alarm.c index 883a42c..7352ccb 100644 --- a/src/alarm.c +++ b/src/alarm.c @@ -24,7 +24,6 @@ #define ALARM_HASH_SIZE 2048 static struct list_head *alarm_hash; -int alarm_counter; void init_alarm(struct alarm_list *t, void *data, @@ -62,16 +61,13 @@ void add_alarm(struct alarm_list *alarm, unsigned long sc, unsigned long usc) gettimeofday(&tv, NULL); timeradd(&alarm->tv, &tv, &alarm->tv); __add_alarm(alarm); - alarm_counter++; } void del_alarm(struct alarm_list *alarm) { /* don't remove a non-inserted node */ - if (!list_empty(&alarm->head)) { + if (!list_empty(&alarm->head)) list_del_init(&alarm->head); - alarm_counter--; - } } static struct timeval * |