git: 134841a7f3e5 - main - cmp: Increase buffer size for non-mmap case.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 31 Jan 2023 00:29:30 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=134841a7f3e5516a83732d40a4d42268c901a492 commit 134841a7f3e5516a83732d40a4d42268c901a492 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-01-31 00:28:53 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-01-31 00:29:05 +0000 cmp: Increase buffer size for non-mmap case. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: rpokala Differential Revision: https://reviews.freebsd.org/D38281 --- usr.bin/cmp/special.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index 7514c01bd59a..1342f2a86270 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -65,8 +65,10 @@ c_special(int fd1, const char *file1, off_t skip1, if ((fp1 = fdopen(fd1, "r")) == NULL) err(ERR_EXIT, "%s", file1); + (void)setvbuf(fp1, NULL, _IOFBF, 65536); if ((fp2 = fdopen(fd2, "r")) == NULL) err(ERR_EXIT, "%s", file2); + (void)setvbuf(fp2, NULL, _IOFBF, 65536); dfound = 0; while (skip1--)