"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: fix typo in got_ferror() call
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Tue, 10 Jan 2023 14:08:12 +0100

Download raw body.

Thread
On Tue, Jan 10, 2023 at 11:34:15PM +1100, Mark Jamsek wrote:
> As per the subject line, looks like a copypasta or typo: we want to
> check the error indicator on rejectfile--not outfile.

Yes, obvious :)

> diff /home/mark/src/got
> commit - 649fd5defd632367fed37d7b10e9ab6df8c7eb73
> path + /home/mark/src/got
> blob - 76e39597d9c660a39120119d1f5538a0f5baf8ce
> file + lib/worktree.c
> --- lib/worktree.c
> +++ lib/worktree.c
> @@ -4255,7 +4255,7 @@ copy_one_line(FILE *infile, FILE *outfile, FILE *rejec
>         if (rejectfile) {
>                 n = fwrite(line, 1, linelen, rejectfile);
>                 if (n != linelen)
> -                       err = got_ferror(outfile, GOT_ERR_IO);
> +                       err = got_ferror(rejectfile, GOT_ERR_IO);
>         }
>  done:
>         free(line);
> 
> -- 
> Mark Jamsek <fnc.bsdbox.org>
> GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68