On Mon, Apr 1, 2019 at 7:52 AM SZEDER Gábor <[email protected]> wrote:
> [...]
> Let's make display_progress() return void, too.
>
> Signed-off-by: SZEDER Gábor <[email protected]>
> ---
> 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.)