HomeClusterLabs Projects

Refactor: libcrmcommon: Remove insert_spaces() static helper

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Refactor: libcrmcommon: Remove insert_spaces() static helper

pcmkxml2text() calls all the functions that currently call
insert_spaces(). It's straightforward to NULL-check buffer and ensure
depth is nonnegative in pcmk
xml2text(). Then the insert_spaces()
helper only saves us about three lines per call. At that point it seems
cleaner to defunctionize it and use loops with an explicitly calculated
number of spaces.

This may trivially improve performance (fewer redundant checks) and code
size (insert_spaces() was inline), but this is mostly for readability.

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

Details

Provenance
nrwahl2Authored on Dec 25 2022, 1:44 AM

Commit No Longer Exists

This commit no longer exists in the repository.