summaryrefslogtreecommitdiff
path: root/miscutils/less.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-04-21 18:38:51 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-04-21 18:38:51 +0200
commit9de2e5a22213842da5b116723392de88de9ed419 (patch)
treedff999a566382174e084d377dc3b4c03de1d4c62 /miscutils/less.c
parent47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (diff)
downloadbusybox-9de2e5a22213842da5b116723392de88de9ed419.tar.gz
*: hopefully all setup_common_bufsiz() are in place
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 94ecf1686..d7076dbbc 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);