]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Let the CRC32_UNROLL_LESS define work on big endian systems as well.
authorhansr <hk-git@circlestorm.org>
Tue, 21 Oct 2014 12:53:37 +0000 (14:53 +0200)
committerhansr <hk-git@circlestorm.org>
Tue, 21 Oct 2014 12:53:37 +0000 (14:53 +0200)
crc32.c

diff --git a/crc32.c b/crc32.c
index dc3a95217cb1cfb27baebc47886f3d67b08d3e15..13107fa9a147409f79c439053fd9d34c585ea7b0 100644 (file)
--- a/crc32.c
+++ b/crc32.c
@@ -304,10 +304,14 @@ local unsigned long crc32_big(unsigned long crc, const unsigned char *buf, unsig
 
     buf4 = (const z_crc_t *)(const void *)buf;
     buf4--;
+
+#ifndef CRC32_UNROLL_LESS
     while (len >= 32) {
         DOBIG32;
         len -= 32;
     }
+#endif
+
     while (len >= 4) {
         DOBIG4;
         len -= 4;