HomeClusterLabs Projects

Low: libcrmcommon: always respect overwrite in pcmk__cmp_nvpair_blocks()

Description

Low: libcrmcommon: always respect overwrite in pcmk__cmp_nvpair_blocks()

When pcmk__cmp_nvpair_blocks() compares scores, it returns a different
sorting value depending on whether unpack_data->overwrite is true.

However, it previously did not check overwrite when comparing NULL
values or when comparing the magic ID that should always sort first.
Now, it does.

This issue didn't matter internally because internal callers always
pass overwrite as FALSE, and the previous values were correct for that.

Details

Provenance
kgaillotAuthored on Oct 29 2024, 6:19 PM
Parents
rP58bf1ef0f969: Refactor: libcrmcommon,libpe_rules: move sort_pairs() to libcrmcommon
Branches
Unknown
Tags
Unknown