HomeClusterLabs Projects

Low: libcrmcommon: handle out-of-range better when parsing integers

Description

Low: libcrmcommon: handle out-of-range better when parsing integers

Previously, scan_ll() converted a strtoll() errno of ERANGE to
EOVERFLOW, but keeping ERANGE makes more sense since the value could be
too small. The change flows to pcmkscan_ll() and
pcmk
parse_ll_range().

Also, pcmk__scan_ll() previously reset the result to the default value if
scan_ll() returned out-of-range. However it should be left as clipped to
the range extreme (which from the scan_ll() log message was the intent).

Add pcmk__scan_ll() unit tests for out-of-range.

Details

Provenance
kgaillotAuthored on Thu, Aug 29, 5:56 PM
Parents
rP41a363d980bf: Feature: CIB: globally-unique defaults to true if clone-node-max > 1
Branches
Unknown
Tags
Unknown