HomeClusterLabs Projects

Refactor: libcib: Don't unset env var in cib_new_no_shadow()

Description

Refactor: libcib: Don't unset env var in cib_new_no_shadow()

There's no need for this function to unset the CIB_shadow environment
variable permanently. We might want to reuse it later. For example, a
CLI tool may call cib_new_no_shadow() to create a connection object for
the active CIB, and then use the CIB_shadow value for something else.

Avoiding the side effect in cib_new_no_shadow() is easier than
pre-saving the value in the caller. It's also less astonishing: I did
not expect that a function whose purpose is to initialize a new cib_t
object (ignoring CIB_shadow) would permanently unset the CIB_shadow
variable.

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

Details

Provenance
nrwahl2Authored on Mar 8 2023, 7:05 PM
Parents
rP8d2678192925: Merge pull request #3042 from gao-yan/cts-regression-rc
Branches
Unknown
Tags
Unknown