summaryrefslogtreecommitdiff
path: root/miscutils/less.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 94ecf16..d7076db 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -440,8 +440,6 @@ static int at_end(void)
*/
static void read_lines(void)
{
-#define readbuf bb_common_bufsiz1
-#define sizeof_readbuf COMMON_BUFSIZE
char *current_line, *p;
int w = width;
char last_terminated = terminated;
@@ -451,6 +449,9 @@ static void read_lines(void)
unsigned old_max_fline = max_fline;
#endif
+#define readbuf bb_common_bufsiz1
+ setup_common_bufsiz();
+
/* (careful: max_fline can be -1) */
if (max_fline + 1 > MAXLINES)
return;
@@ -482,7 +483,7 @@ static void read_lines(void)
time_t t;
errno = 0;
- eof_error = safe_read(STDIN_FILENO, readbuf, sizeof_readbuf);
+ eof_error = safe_read(STDIN_FILENO, readbuf, COMMON_BUFSIZE);
if (errno != EAGAIN)
break;
t = time(NULL);