diff options
Diffstat (limited to 'coreutils/sum.c')
-rw-r--r-- | coreutils/sum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/sum.c b/coreutils/sum.c index cc6677221..ec9ed2a11 100644 --- a/coreutils/sum.c +++ b/coreutils/sum.c | |||
@@ -31,12 +31,14 @@ enum { SUM_BSD, PRINT_NAME, SUM_SYSV }; | |||
31 | /* Return 1 if successful. */ | 31 | /* Return 1 if successful. */ |
32 | static unsigned sum_file(const char *file, unsigned type) | 32 | static unsigned sum_file(const char *file, unsigned type) |
33 | { | 33 | { |
34 | #define buf bb_common_bufsiz1 | ||
35 | unsigned long long total_bytes = 0; | 34 | unsigned long long total_bytes = 0; |
36 | int fd, r; | 35 | int fd, r; |
37 | /* The sum of all the input bytes, modulo (UINT_MAX + 1). */ | 36 | /* The sum of all the input bytes, modulo (UINT_MAX + 1). */ |
38 | unsigned s = 0; | 37 | unsigned s = 0; |
39 | 38 | ||
39 | #define buf bb_common_bufsiz1 | ||
40 | setup_common_bufsiz(); | ||
41 | |||
40 | fd = open_or_warn_stdin(file); | 42 | fd = open_or_warn_stdin(file); |
41 | if (fd == -1) | 43 | if (fd == -1) |
42 | return 0; | 44 | return 0; |