summaryrefslogtreecommitdiff
path: root/t/helper
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-03 22:40:12 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-02-03 15:39:55 -0800
commit587c3d0da67aecc7c9defb576614962f8ca3faf8 (patch)
treea76697fec7a714e7e9b13d20094ac0684aaff99a /t/helper
parentleak tests: fix a memory leak in "test-progress" helper (diff)
downloadtgif-587c3d0da67aecc7c9defb576614962f8ca3faf8.tar.xz
progress.c test helper: add missing braces
If we have braces on one arm of an if/else all of them should have it, per the CodingGuidelines's "When there are multiple arms to a conditional[...]" advice. This formatting change makes a subsequent commit smaller. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-progress.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/helper/test-progress.c b/t/helper/test-progress.c
index 9265e6ab7c..50fd3be3da 100644
--- a/t/helper/test-progress.c
+++ b/t/helper/test-progress.c
@@ -63,10 +63,11 @@ int cmd__progress(int argc, const char **argv)
die("invalid input: '%s'\n", line.buf);
progress_test_ns = test_ms * 1000 * 1000;
display_throughput(progress, byte_count);
- } else if (!strcmp(line.buf, "update"))
+ } else if (!strcmp(line.buf, "update")) {
progress_test_force_update();
- else
+ } else {
die("invalid input: '%s'\n", line.buf);
+ }
}
stop_progress(&progress);
strbuf_release(&line);