HomeClusterLabs Projects

Refactor: libcrmcommon: Functionize writing compressed data to stream

Description

Refactor: libcrmcommon: Functionize writing compressed data to stream

Gets rid of some redundancies and hard-to-follow control flow.

Other minor changes:

  • Return EIO instead of errno in case fprintf() fails. fprintf() doesn't set errno on error.
  • Ensure filename is non-NULL.

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

Details

Provenance
nrwahl2Authored on Feb 9 2024, 10:55 PM
Parents
rPc0cfb1461fb1: Refactor: libcrmcommon: Some best practices in write_xml_stream()
Branches
Unknown
Tags
Unknown