summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/run.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/run.c b/src/run.c
index 3481193..8919b6c 100644
--- a/src/run.c
+++ b/src/run.c
@@ -230,7 +230,8 @@ void run(void)
/* initialization: get the first alarm available */
gettimeofday(&tv, NULL);
- get_next_alarm(&tv, next);
+ if (!get_next_alarm(&tv, next))
+ next = NULL;
while(1) {
if (__run(next)) {