summaryrefslogtreecommitdiffstats
path: root/src/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.c')
-rw-r--r--src/args.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/args.c b/src/args.c
index 6686fe0..e600cc2 100644
--- a/src/args.c
+++ b/src/args.c
@@ -326,7 +326,7 @@ static long parse_datearg(const char *str)
(int *)&day.mm, (int *)&day.dd, NULL))
return date2sec(day, 0, 0);
- return -1;
+ return LONG_MAX;
}
static long parse_datetimearg(const char *str)
@@ -345,7 +345,7 @@ static long parse_datetimearg(const char *str)
if (!parse_time(time, &hour, &min))
return -1;
ret = parse_datearg(date);
- if (!ret)
+ if (ret == LONG_MAX)
return -1;
ret += hour * HOURINSEC + min * MININSEC;
@@ -353,7 +353,7 @@ static long parse_datetimearg(const char *str)
}
ret = parse_datearg(date);
- if (ret < 0) {
+ if (ret == LONG_MAX) {
/* No date specified, use time only. */
if (!parse_time(date, &hour, &min))
return -1;