HomeClusterLabs Projects

Refactor: libcrmcommon: Some best practices in write_xml_stream()

Description

Refactor: libcrmcommon: Some best practices in write_xml_stream()

Note that stream gets closed, use pcmk__str_empty(), log XML at info
level, note what bzWriteOpen() params mean, check BZ return codes where
appropriate, close BZFILE on error, use %u for formatting unsigned int.

For bzWriteOpen(), the default workFactor is 30. Instead of using this
magic number, we now use 0, which means "use the default value."

The block size ranges from 1 to 9, and there's no default value.

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

Details

Provenance
nrwahl2Authored on Feb 9 2024, 9:23 PM
Parents
rPc5c084e81eae: Refactor: libcrmcommon: Accept NULL nbytes in write_xml_stream()
Branches
Unknown
Tags
Unknown