HomeClusterLabs Projects

Low: pacemaker-attrd: use pcmk_parse_score() in attrd_expand_value()

Description

Low: pacemaker-attrd: use pcmk_parse_score() in attrd_expand_value()

This has a slight difference in behavior. Previously, if the original
value wasn't a valid score, "value++"/"value+=OFFSET" would treat the
original value as zero and increment it. Now, the expanded value is 0
(not incremented).

Additionally, negative increments do not appear to have been considered
as a possibility initially, but the syntax would work, so bound the
result to -INFINITY.

Also, improve variable names and formatting.

Details

Provenance
kgaillotAuthored on Aug 29 2024, 11:25 AM
Parents
rPbfbcc98b6717: API: libcrmcommon: add pcmk_parse_score()
Branches
Unknown
Tags
Unknown