aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cksum.c')
-rw-r--r--coreutils/cksum.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 865bea0ee..987f5f32c 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -27,8 +27,9 @@ int cksum_main(int argc, char **argv)
27 crc = 0; 27 crc = 0;
28 length = 0; 28 length = 0;
29 29
30 while ((bytes_read = fread(bb_common_bufsiz1, 1, BUFSIZ, fp)) > 0) { 30#define read_buf bb_common_bufsiz1
31 cp = bb_common_bufsiz1; 31 while ((bytes_read = fread(read_buf, 1, BUFSIZ, fp)) > 0) {
32 cp = read_buf;
32 length += bytes_read; 33 length += bytes_read;
33 while (bytes_read--) 34 while (bytes_read--)
34 crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ (*cp++)) & 0xffL]; 35 crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ (*cp++)) & 0xffL];