diff options
author | Doug Christman <douglaschristman@gmail.com> | 2016-12-06 14:41:15 -0500 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-12-06 20:41:15 +0100 |
commit | c0df71fa36b5cacd682bf5748aabd21ca20d7807 (patch) | |
tree | 8a1b208f36c16f0aaa89cfdfbda1cc4b2f8e9e43 /src/basic/calendarspec.c | |
parent | 9c77d1079dd905b90e488082a92764fcc14833e2 (diff) |
calendarspec: always interpret missing seconds as :00 (#4813)
"*:*" should be equivalent to "*-*-* *:*:00" (minutely)
rather than running every microsecond.
Fixes #4804
Diffstat (limited to 'src/basic/calendarspec.c')
-rw-r--r-- | src/basic/calendarspec.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/basic/calendarspec.c b/src/basic/calendarspec.c index 8b57de4744..514587d237 100644 --- a/src/basic/calendarspec.c +++ b/src/basic/calendarspec.c @@ -752,12 +752,8 @@ static int parse_calendar_time(const char **p, CalendarSpec *c) { goto fail; /* Already at the end? Then it's hours and minutes, and seconds are 0 */ - if (*t == 0) { - if (m != NULL) - goto null_second; - - goto finish; - } + if (*t == 0) + goto null_second; if (*t != ':') { r = -EINVAL; |