summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apoint.c8
-rw-r--r--src/event.c8
-rw-r--r--src/recur.c16
3 files changed, 16 insertions, 16 deletions
diff --git a/src/apoint.c b/src/apoint.c
index d200cf3..e8f9ee8 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -234,13 +234,13 @@ struct apoint *apoint_scan(FILE * f, struct tm start, struct tm end,
return NULL;
if (filter->regex && regexec(filter->regex, buf, 0, 0, 0))
return NULL;
- if (filter->start_from >= 0 && tstart < filter->start_from)
+ if (filter->start_from != -1 && tstart < filter->start_from)
return NULL;
- if (filter->start_to >= 0 && tstart > filter->start_to)
+ if (filter->start_to != -1 && tstart > filter->start_to)
return NULL;
- if (filter->end_from >= 0 && tend < filter->end_from)
+ if (filter->end_from != -1 && tend < filter->end_from)
return NULL;
- if (filter->end_to >= 0 && tend > filter->end_to)
+ if (filter->end_to != -1 && tend > filter->end_to)
return NULL;
}
diff --git a/src/event.c b/src/event.c
index c4c52db..fe8f883 100644
--- a/src/event.c
+++ b/src/event.c
@@ -183,13 +183,13 @@ struct event *event_scan(FILE * f, struct tm start, int id, char *note,
return NULL;
if (filter->regex && regexec(filter->regex, buf, 0, 0, 0))
return NULL;
- if (filter->start_from >= 0 && tstart < filter->start_from)
+ if (filter->start_from != -1 && tstart < filter->start_from)
return NULL;
- if (filter->start_to >= 0 && tstart > filter->start_to)
+ if (filter->start_to != -1 && tstart > filter->start_to)
return NULL;
- if (filter->end_from >= 0 && tend < filter->end_from)
+ if (filter->end_from != -1 && tend < filter->end_from)
return NULL;
- if (filter->end_to >= 0 && tend > filter->end_to)
+ if (filter->end_to != -1 && tend > filter->end_to)
return NULL;
}
diff --git a/src/recur.c b/src/recur.c
index e4cc1b2..ca99a21 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -397,13 +397,13 @@ struct recur_apoint *recur_apoint_scan(FILE * f, struct tm start,
return NULL;
if (filter->regex && regexec(filter->regex, buf, 0, 0, 0))
return NULL;
- if (filter->start_from >= 0 && tstart < filter->start_from)
+ if (filter->start_from != -1 && tstart < filter->start_from)
return NULL;
- if (filter->start_to >= 0 && tstart > filter->start_to)
+ if (filter->start_to != -1 && tstart > filter->start_to)
return NULL;
- if (filter->end_from >= 0 && tend < filter->end_from)
+ if (filter->end_from != -1 && tend < filter->end_from)
return NULL;
- if (filter->end_to >= 0 && tend > filter->end_to)
+ if (filter->end_to != -1 && tend > filter->end_to)
return NULL;
}
@@ -470,13 +470,13 @@ struct recur_event *recur_event_scan(FILE * f, struct tm start, int id,
return NULL;
if (filter->regex && regexec(filter->regex, buf, 0, 0, 0))
return NULL;
- if (filter->start_from >= 0 && tstart < filter->start_from)
+ if (filter->start_from != -1 && tstart < filter->start_from)
return NULL;
- if (filter->start_to >= 0 && tstart > filter->start_to)
+ if (filter->start_to != -1 && tstart > filter->start_to)
return NULL;
- if (filter->end_from >= 0 && tend < filter->end_from)
+ if (filter->end_from != -1 && tend < filter->end_from)
return NULL;
- if (filter->end_to >= 0 && tend > filter->end_to)
+ if (filter->end_to != -1 && tend > filter->end_to)
return NULL;
}