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
rP9bbd5b974c81: Merge pull request #3465 from clumens/pyflake
Branches
Unknown
Tags
Unknown