summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index c638f10..3a5ab12 100644
--- a/eval.c
+++ b/eval.c
@@ -236,11 +236,13 @@ bool eval_time(const struct expr *expr, struct eval_state *state) {
time_t diff = timespec_diff(&expr->reftime, time);
switch (expr->time_unit) {
+ case DAYS:
+ diff /= 60*24;
+ fallthrough;
case MINUTES:
diff /= 60;
- break;
- case DAYS:
- diff /= 60*60*24;
+ fallthrough;
+ case SECONDS:
break;
}