HomeClusterLabs Projects

Refactor: libcrmcommon: Drop old_xml NULL case from mark_xml_changes()

Description

Refactor: libcrmcommon: Drop old_xml NULL case from mark_xml_changes()

We can easily bring the two lines of code down into the bottom for-loop.

The only callers are xml_calculate_changes() (which ensures old_xml is
not NULL) and the recursive calls. So we know that the top-level call
will never have old_xml as NULL.

This also allows us to drop the check_top argument.

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

Details

Provenance
nrwahl2Authored on Mar 14 2025, 10:19 PM
Parents
rP6df5e378cadd: Refactor: libcrmcommon: Some best practices in mark_xml_changes()
Branches
Unknown
Tags
Unknown