coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] maint: tac: use BUFSIZE for buffer sizes


From: Pádraig Brady
Subject: Re: [PATCH 1/3] maint: tac: use BUFSIZE for buffer sizes
Date: Wed, 18 Nov 2026 12:06:36 +0000
User-agent: Mozilla Thunderbird Beta

On 18/11/2026 06:26, Collin Funk wrote:
From: Ismail Ramzi <ismail@bugqore.com>

* src/tac.c (INITIAL_READSIZE, WRITESIZE): Define to BUFSIZ.
---
  src/tac.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tac.c b/src/tac.c
index 1845791ab..e39b26b8e 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -58,10 +58,10 @@ tac -r -s '.\|
/* The number of bytes per atomic read. */
-#define INITIAL_READSIZE 8192
+#define INITIAL_READSIZE BUFSIZ
/* The number of bytes per atomic write. */
-#define WRITESIZE 8192
+#define WRITESIZE BUFSIZ
/* The string that separates the records of the file. */
  static char const *separator = "\n";

In retrospect this is a bad suggestion from me.
BUFSIZ is too variable and based on stdio which tac doesn't use.
So it's probably best to drop this.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]