HomeClusterLabs Projects

Refactor: libcrmcommon: Best practices in pcmk__alert_in_patchset()

Description

Refactor: libcrmcommon: Best practices in pcmk__alert_in_patchset()

Use const where possible. Functionize v1 and v2 logic. Use better
default for rc. Error-check rc getter. Use CIB XPath getter functions
for maintainability. Iterate over only XML_DIFF_CHANGE elements for v2.
Use true/false. Use pcmk__starts_with() instead of strstr(). Clarify
test conditions.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Aug 8 2023, 9:41 PM
Parents
rP7a82ce5f5703: Refactor: libcrmcommon: New pcmk__cib_abs_xpath_for()
Branches
Unknown
Tags
Unknown