]> git.corax.cc Git - toolbox/commit
include/opt: Improve code readability
authorMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:57:48 +0000 (02:57 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 11 Aug 2022 17:57:48 +0000 (02:57 +0900)
commitabdb5b0556e6cb2686218046d18ce59dd11cc105
tree712717062b620c01e37ff66f983db0e2bf12f90f
parent9cd91f5ef4c0030e0138f3f496d29d6d18c21c64
include/opt: Improve code readability

There are several functions in the opt module where local variables
are not declared in the most narrow block possible, statements are
needlessly spread over multiple lines, and values used only once
are assigned to variables; all of which impeding readability.

This commit modifies the opt module to remove cases of assign-once-
read-once variables, remove integer increments on separate lines,
make the "scope" of variables narrower, and declare variables
with a type, where possible.
include/opt.sh