diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-10 10:25:01 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-10 13:06:32 +0200 |
commit | 3aff2ae9d5427498f673bcb086d3439d2047e6c9 (patch) | |
tree | 637a10a012cb08e3ad1005c81930923111318982 /src/shared | |
parent | 4f23345592f9b2822a4f96f947230c9112fd1d4a (diff) | |
download | systemd-3aff2ae9d5427498f673bcb086d3439d2047e6c9.tar.gz |
shared/calendarspec: fix printing of second ranges which start with 0
0..3 is not the same as 0..infinity, we need to check both ends of the range.
This logic was added in 3215e35c405278491f55fb486d349f132e93f516, and back then
the field was called .value. .stop was added later and apparently wasn't taken
into account here.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/calendarspec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c index 51ade0e887..273a38f1fa 100644 --- a/src/shared/calendarspec.c +++ b/src/shared/calendarspec.c @@ -298,7 +298,7 @@ static void format_chain(FILE *f, int space, const CalendarComponent *c, bool us return; } - if (usec && c->start == 0 && c->repeat == USEC_PER_SEC && !c->next) { + if (usec && c->start == 0 && c->stop < 0 && c->repeat == USEC_PER_SEC && !c->next) { fputc('*', f); return; } |