aboutsummaryrefslogtreecommitdiffstats
path: root/src/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/entry.c')
-rw-r--r--src/entry.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/entry.c b/src/entry.c
index 64acdea..f903d97 100644
--- a/src/entry.c
+++ b/src/entry.c
@@ -93,19 +93,19 @@ static int sub_inc_minute(struct tm *t, int n)
static int sub_inc_second(struct tm *t, int n)
{
- time_t r;
+ time_t rt;
struct tm *tmp;
if (n == 0)
return 0;
- r = mktime(t);
+ rt = mktime(t);
- if (r + n <= r)
+ if (rt + n <= rt)
return -1;
- r += n;
+ rt += n;
- tmp = localtime(&r);
+ tmp = localtime(&rt);
*t = *tmp;
return 0;
@@ -116,7 +116,7 @@ static int sub_inc_second(struct tm *t, int n)
bool entry_is_active(struct entry_s *e, time_t now)
{
struct tm t, *tmp;
- time_t rtmp, now_plus_warn;
+ time_t rt, now_plus_warn;
assert(e != NULL);
@@ -153,13 +153,13 @@ bool entry_is_active(struct entry_s *e, time_t now)
if (e->has_end && now > e->end)
return false;
- for (rtmp = e->start;;) {
- rtmp = mktime(&t);
+ for (rt = e->start;;) {
+ rt = mktime(&t);
- if (rtmp > now_plus_warn)
+ if (rt > now_plus_warn)
return false;
- if (rtmp >= now)
+ if (rt >= now)
return true;
if (sub_inc_year(&t, e->every.year))