Re: [PATCH] Prefer fgetc over fgets where possible
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jul 17, 2023, 20:14 UTC
- Message-ID
- <ZLWhLH2xRq20jFFY@nand.local>
- In-Reply-To
- <pull.1550.git.git.1689608291732.gitgitgadget@gmail.com>
On Mon, Jul 17, 2023 at 03:38:11PM +0000, AtariDreams via GitGitGadget wrote:
Show 8 quoted lines
> --- > Prefer fgetc over fgets where possible > > fputc is meant for single characters, fputs is for strings. We are > better off inserting sole \n characters as characters, not whole > strings. > > Signed-off-by: Seija Kijin doremylover123@gmail.com
I tend to agree with Junio's assessment that adding churn here isn't strictly necessary / worth it, but if we do end up taking this patch, note that the subject should reference `fputc()` and `fputs()` instead of `fgetc()` and `fgets()`.
Taylor