HomeClusterLabs Projects

Refactor: libcrmcommon: separate an "if" block in update_validation()

Description

Refactor: libcrmcommon: separate an "if" block in update_validation()

The code previously had logic like:

rc = pcmk_ok;
if (transform) {
    ...
}
if (transform == FALSE || rc != pcmk_ok) {
    /* we need some progress! */
    lpc++;
}

The two cases in the last "if" are logically unrelated, and combining them
confuses what's happening. Move the "tranform == FALSE" case into an "else"
for the first "if", and move the "rc != pcmk_ok" case to the only place where
that's possible.

Details

Provenance
kgaillotAuthored on Apr 17 2024, 1:15 PM
Parents
rP6e52c3d44ac9: Refactor: libcrmcommon: drop redundant code in update_validation()
Branches
Unknown
Tags
Unknown