HomeClusterLabs Projects

Refactor: fencing: make "stonith-event" message take int instead of gboolean

Description

Refactor: fencing: make "stonith-event" message take int instead of gboolean

The callers of the "stonith-event" message pass either an int or a bool as the
"full_history" argument, which is actually declared as gboolean in the
"stonith-event" implementations. Since it is a variadic function, all those
undergo implicit promotion to int.

Declaring the argument as gboolean works because gboolean is defined as an int,
but this just hides the implicit promotion. Declare it explicitly as int to
make what's happening more obvious.

There are plenty of other message functions that use gboolean, but that is out
of scope of the current project.

Details

Provenance
kgaillotAuthored on Feb 24 2022, 4:52 PM
Parents
rP272e1850eeea: Refactor: fencing: functionize creating a history entry description
Branches
Unknown
Tags
Unknown