diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-29 07:31:14 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-09-29 11:09:39 -0400 |
commit | b1d6dcf5a5c5aa02843c026dede0638f77798cb4 (patch) | |
tree | 6065b8eedce06acb651c6ad2d378749049951fcb /src/core/timer.c | |
parent | ee26bcc0387f6eda83878eb85a08c01ee0d82c44 (diff) |
Do not format USEC_INFINITY as NULL
systemctl would print 'CPUQuotaPerSecUSec=(null)' for no limit. This
does not look right.
Since USEC_INFINITY is one of the valid values, format_timespan()
could return NULL, and we should wrap every use of it in strna() or
similar. But most callers didn't do that, and it seems more robust to
return a string ("infinity") that makes sense most of the time, even
if in some places the result will not be grammatically correct.
Diffstat (limited to 'src/core/timer.c')
-rw-r--r-- | src/core/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/timer.c b/src/core/timer.c index dc0f289c7a..a3713e2140 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -242,7 +242,7 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) { "%s%s: %s\n", prefix, timer_base_to_string(v->base), - strna(format_timespan(timespan1, sizeof(timespan1), v->value, 0))); + format_timespan(timespan1, sizeof(timespan1), v->value, 0)); } } } |