HomeClusterLabs Projects

Low: libcrmcommon: ignore NULL first ID in pcmk__cmp_nvpair_blocks()

Description

Low: libcrmcommon: ignore NULL first ID in pcmk__cmp_nvpair_blocks()

pcmk__cmp_nvpair_blocks() can treat a particular XML ID as always having
the highest priority.

Previously, it assumed unpack_data->first_id was non-NULL. Now, skip the
check if it's NULL.

This did not matter for internal callers since the sorted blocks should
always have an ID (and thus not match a NULL first_id). It could
theoretically matter in a CIB with schema validation disabled and blocks
without IDs.

Details

Provenance
kgaillotAuthored on Oct 29 2024, 6:34 PM
Parents
rP1e0f8494fb4c: Refactor: libcrmcommon: best practices for pcmk__cmp_nvpair_blocks()
Branches
Unknown
Tags
Unknown