[PATCH 15/20] parse-options-cb.c: use braces on multiple conditional arms
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 8, 2018, 22:41 UTC
- Message-ID
- <20180608224136.20220-16-avarab@gmail.com>
- In-Reply-To
- <20180608224136.20220-1-avarab@gmail.com>
Adjust this code that'll be modified in a subsequent change to have more than one line per branch to use braces per the CodingGuidelines, this makes the later change easier to understand.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- parse-options-cb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/parse-options-cb.c b/parse-options-cb.c index 298b5735c8..e3cd87fbd6 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -19,10 +19,11 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset) v = strtol(arg, (char **)&arg, 10); if (*arg) return opterror(opt, "expects a numerical value", 0); - if (v && v < MINIMUM_ABBREV) + if (v && v < MINIMUM_ABBREV) { v = MINIMUM_ABBREV; - else if (v > GIT_SHA1_HEXSZ) + } else if (v > GIT_SHA1_HEXSZ) { v = GIT_SHA1_HEXSZ; + } } *(int *)(opt->value) = v; return 0;
-- 2.17.0.290.gded63e768a