summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--progress.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/progress.c b/progress.c
index 680c6a8bf9..6e7daa3f8a 100644
--- a/progress.c
+++ b/progress.c
@@ -319,21 +319,24 @@ static void finish_if_sparse(struct progress *progress)
void stop_progress(struct progress **p_progress)
{
+ struct progress *progress;
+
if (!p_progress)
BUG("don't provide NULL to stop_progress");
+ progress = *p_progress;
- finish_if_sparse(*p_progress);
+ finish_if_sparse(progress);
- if (*p_progress) {
+ if (progress) {
trace2_data_intmax("progress", the_repository, "total_objects",
- (*p_progress)->total);
+ progress->total);
- if ((*p_progress)->throughput)
+ if (progress->throughput)
trace2_data_intmax("progress", the_repository,
"total_bytes",
- (*p_progress)->throughput->curr_total);
+ progress->throughput->curr_total);
- trace2_region_leave("progress", (*p_progress)->title, the_repository);
+ trace2_region_leave("progress", progress->title, the_repository);
}
stop_progress_msg(p_progress, _("done"));