HomeClusterLabs Projects

Log: libcrmcommon: improve time-as-string function

Description

Log: libcrmcommon: improve time-as-string function

This tweaks the string so that the singular or plural is always used correctly,
spaces are added only when needed, and "<undefined time>" is used instead of
the empty string for a NULL argument.

Additionally, this does one dynamic memory allocation of exactly the amount
needed, rather than potentially multiple allocations that total more than
needed, and it asserts on memory errors so that callers can assume the return
value is non-NULL (which some already do).

Details

Provenance
kgaillotAuthored on Sep 20 2019, 1:33 PM
Parents
rPcc4d6f552536: Test: scheduler: update regression tests for new recheck-by parameter
Branches
Unknown
Tags
Unknown

Event Timeline