summaryrefslogtreecommitdiff
path: root/coreutils/cksum.c
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-21 18:38:51 +0200
committerDenys Vlasenko2016-04-21 18:38:51 +0200
commit9de2e5a22213842da5b116723392de88de9ed419 (patch)
treedff999a566382174e084d377dc3b4c03de1d4c62 /coreutils/cksum.c
parent47cfbf32fd66563f8c4e09ad6cced6abfbe2fad5 (diff)
downloadbusybox-9de2e5a22213842da5b116723392de88de9ed419.zip
busybox-9de2e5a22213842da5b116723392de88de9ed419.tar.gz
*: hopefully all setup_common_bufsiz() are in place
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/cksum.c')
-rw-r--r--coreutils/cksum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index d8351e7..8a8a39f 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -33,6 +33,7 @@ int cksum_main(int argc UNUSED_PARAM, char **argv)
argv++;
#endif
+ setup_common_bufsiz();
do {
int fd = open_or_warn_stdin(*argv ? *argv : bb_msg_standard_input);
@@ -43,9 +44,8 @@ int cksum_main(int argc UNUSED_PARAM, char **argv)
crc = 0;
length = 0;
-#define read_buf bb_common_bufsiz1
-#define sizeof_read_buf COMMON_BUFSIZE
- while ((bytes_read = safe_read(fd, read_buf, sizeof_read_buf)) > 0) {
+#define read_buf bb_common_bufsiz1
+ while ((bytes_read = safe_read(fd, read_buf, COMMON_BUFSIZE)) > 0) {
length += bytes_read;
crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table);
}