diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:38:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-04-21 18:38:51 +0200 |
commit | 9de2e5a22213842da5b116723392de88de9ed419 (patch) | |
tree | dff999a566382174e084d377dc3b4c03de1d4c62 /miscutils/less.c | |
parent | 47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (diff) | |
download | busybox-w32-9de2e5a22213842da5b116723392de88de9ed419.tar.gz busybox-w32-9de2e5a22213842da5b116723392de88de9ed419.tar.bz2 busybox-w32-9de2e5a22213842da5b116723392de88de9ed419.zip |
*: 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.c | 7 |
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) | |||
440 | */ | 440 | */ |
441 | static void read_lines(void) | 441 | static void read_lines(void) |
442 | { | 442 | { |
443 | #define readbuf bb_common_bufsiz1 | ||
444 | #define sizeof_readbuf COMMON_BUFSIZE | ||
445 | char *current_line, *p; | 443 | char *current_line, *p; |
446 | int w = width; | 444 | int w = width; |
447 | char last_terminated = terminated; | 445 | char last_terminated = terminated; |
@@ -451,6 +449,9 @@ static void read_lines(void) | |||
451 | unsigned old_max_fline = max_fline; | 449 | unsigned old_max_fline = max_fline; |
452 | #endif | 450 | #endif |
453 | 451 | ||
452 | #define readbuf bb_common_bufsiz1 | ||
453 | setup_common_bufsiz(); | ||
454 | |||
454 | /* (careful: max_fline can be -1) */ | 455 | /* (careful: max_fline can be -1) */ |
455 | if (max_fline + 1 > MAXLINES) | 456 | if (max_fline + 1 > MAXLINES) |
456 | return; | 457 | return; |
@@ -482,7 +483,7 @@ static void read_lines(void) | |||
482 | time_t t; | 483 | time_t t; |
483 | 484 | ||
484 | errno = 0; | 485 | errno = 0; |
485 | eof_error = safe_read(STDIN_FILENO, readbuf, sizeof_readbuf); | 486 | eof_error = safe_read(STDIN_FILENO, readbuf, COMMON_BUFSIZE); |
486 | if (errno != EAGAIN) | 487 | if (errno != EAGAIN) |
487 | break; | 488 | break; |
488 | t = time(NULL); | 489 | t = time(NULL); |