From: Eric Sunshine Date: Tue, 02 Apr 2019 05:45:15 GMT Subject: Re: [PATCH v2 2/4] progress: assemble percentage and counters in a strbuf before printing Message-ID: In-Reply-To: <20190401115217.3423-3-szeder.dev@gmail.com> On Mon, Apr 1, 2019 at 7:52 AM SZEDER Gábor wrote: > [...] > To prepare for those changes assemble the changing parts in a separate > strbuf kept in 'struct progress' before printing. > > Signed-off-by: SZEDER Gábor > --- > diff --git a/progress.c b/progress.c > @@ -80,36 +81,42 @@ static int is_foreground_fd(int fd) > static void display(struct progress *progress, uint64_t n, const char *done) > { > if (progress->total) { > if (percent != progress->last_percent || progress_update) { > [...] > - progress_update = 0; > - return; > } > + if (show_update) { > [...] > progress_update = 0; > - return; > } Removal of these two 'returns' is unrelated to the change made by this patch and should have been done by 1/4. > return; Likewise, this final 'return' doesn't need to be here and should go away in 1/4.