HomeClusterLabs Projects
Diffusion Booth 527c5811c8d0

Refactor: Unindent various code blocks in raft.c.
527c5811c8d0Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Refactor: Unindent various code blocks in raft.c.

When we have a condition with a bunch of code under it, these can often
be rewritten to invert the condition and exit which allows all the
previously indented code to be un-indented. This can make the resulting
code easier to follow.

Additionally, we can unindent some else blocks if every path before them
included a return.

Details

Provenance
clumensAuthored on Dec 3 2024, 2:02 PM
Parents
rBbe0eaea6bb5e: Refactor: Remove global booth_conf variable in raft.c.
Branches
Unknown
Tags
Unknown

Event Timeline