HomeClusterLabs Projects

Refactor: libcrmcommon: drop unnecessary arguments to parse_int()

Description

Refactor: libcrmcommon: drop unnecessary arguments to parse_int()

The lone caller always passed field_width 10 and upper_bound 0.
Also, use bool instead of gboolean, drop the unnecessary "intermediate"
variable, and use a switch where appropriate.

This allows the code to simplify a bit and highlights problems with it.
In particular, the algorithm for parsing fractions was wildly wrong and always
ended with a result of 0. Rather than fix it, just leave the result 0 for now.

Details

Provenance
kgaillotAuthored on May 15 2024, 11:44 AM
Parents
rP39ef082405a1: Doc: ChangeLog: update for 2.1.8-rc1 release
Branches
Unknown
Tags
Unknown