From 8078747751df6e8ccc27b76f2f53c5e393d745ae Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org" Date: Tue, 22 Jan 2008 01:32:21 +0000 Subject: remove alarm counter --- include/alarm.h | 2 -- src/alarm.c | 6 +----- 2 files changed, 1 insertion(+), 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 -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 * -- cgit v1.2.3