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-23 12:15:25 +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-23 12:15:25 +0000 |
commit | d658f3ed913affe96511309c6bf3d37aaec2910f (patch) | |
tree | 1d08abef62e0f7555b9198cc07597a568d36da40 /src/alarm.c | |
parent | c4d3ba8748a12a9ad466b3b1c50cc31d36cd5418 (diff) | |
download | conntrack-tools-d658f3ed913affe96511309c6bf3d37aaec2910f.tar.gz conntrack-tools-d658f3ed913affe96511309c6bf3d37aaec2910f.zip |
Max Kellermann <max@duempel.org>:
introduce alarm_pending()
Diffstat (limited to 'src/alarm.c')
-rw-r--r-- | src/alarm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/alarm.c b/src/alarm.c index 7352ccb..4b23bd1 100644 --- a/src/alarm.c +++ b/src/alarm.c @@ -70,6 +70,14 @@ void del_alarm(struct alarm_list *alarm) list_del_init(&alarm->head); } +int alarm_pending(struct alarm_list *alarm) +{ + if (list_empty(&alarm->head)) + return 0; + + return 1; +} + static struct timeval * calculate_next_run(struct timeval *cand, struct timeval *tv, |