From: Eric Sunshine Date: Tue, 02 Apr 2019 05:42:12 GMT Subject: Re: [PATCH v2 1/4] progress: make display_progress() return void Message-ID: In-Reply-To: <20190401115217.3423-2-szeder.dev@gmail.com> On Mon, Apr 1, 2019 at 7:52 AM SZEDER Gábor wrote: > [...] > Let's make display_progress() return void, too. > > Signed-off-by: SZEDER Gábor > --- > diff --git a/progress.c b/progress.c > @@ -78,12 +78,12 @@ static int is_foreground_fd(int fd) > -static int display(struct progress *progress, uint64_t n, const char *done) > +static void display(struct progress *progress, uint64_t n, const char *done) > { > if (progress->delay && (!progress_update || --progress->delay)) > - return 0; > + return; This 'return' needs to stay, but... > @@ -100,7 +100,7 @@ static int display(struct progress *progress, uint64_t n, const char *done) > progress_update = 0; > - return 1; > + return; > } > } else if (progress_update) { > @@ -109,10 +109,10 @@ static int display(struct progress *progress, uint64_t n, const char *done) > progress_update = 0; > - return 1; > + return; > } > > - return 0; > + return; > } ... these three 'returns' can all go away. (In fact, the first two mysteriously disappear in patch 2/4.)