diff options
Diffstat (limited to 'coreutils/sum.c')
-rw-r--r-- | coreutils/sum.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/sum.c b/coreutils/sum.c index deb068e10..cc6677221 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
@@ -21,6 +21,7 @@ | |||
21 | //usage: "\n -s Use System V sum algorithm (512byte blocks)" | 21 | //usage: "\n -s Use System V sum algorithm (512byte blocks)" |
22 | 22 | ||
23 | #include "libbb.h" | 23 | #include "libbb.h" |
24 | #include "common_bufsiz.h" | ||
24 | 25 | ||
25 | enum { SUM_BSD, PRINT_NAME, SUM_SYSV }; | 26 | enum { SUM_BSD, PRINT_NAME, SUM_SYSV }; |
26 | 27 | ||
@@ -41,7 +42,7 @@ static unsigned sum_file(const char *file, unsigned type) | |||
41 | return 0; | 42 | return 0; |
42 | 43 | ||
43 | while (1) { | 44 | while (1) { |
44 | size_t bytes_read = safe_read(fd, buf, BUFSIZ); | 45 | size_t bytes_read = safe_read(fd, buf, COMMON_BUFSIZE); |
45 | 46 | ||
46 | if ((ssize_t)bytes_read <= 0) { | 47 | if ((ssize_t)bytes_read <= 0) { |
47 | r = (fd && close(fd) != 0); | 48 | r = (fd && close(fd) != 0); |