Commit de027d3f authored by David S. Miller's avatar David S. Miller

[CRC32]: Fix pointer casts on 64-bit.

parent ced7d944
...@@ -92,7 +92,7 @@ u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len) ...@@ -92,7 +92,7 @@ u32 attribute((pure)) crc32_le(u32 crc, unsigned char const *p, size_t len)
crc = __cpu_to_le32(crc); crc = __cpu_to_le32(crc);
/* Align it */ /* Align it */
for ( ; ((u32)b)&3 && len ; len--){ for ( ; ((long)b)&3 && len ; len--){
# ifdef __LITTLE_ENDIAN # ifdef __LITTLE_ENDIAN
crc = (crc>>8) ^ crc32table_le[ (crc ^ *((u8 *)b)++) & 0xff ]; crc = (crc>>8) ^ crc32table_le[ (crc ^ *((u8 *)b)++) & 0xff ];
# else # else
...@@ -201,7 +201,7 @@ u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len) ...@@ -201,7 +201,7 @@ u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len)
crc = __cpu_to_be32(crc); crc = __cpu_to_be32(crc);
/* Align it */ /* Align it */
for ( ; ((u32)b)&3 && len ; len--){ for ( ; ((long)b)&3 && len ; len--){
# ifdef __LITTLE_ENDIAN # ifdef __LITTLE_ENDIAN
crc = (crc>>8) ^ crc32table_be[ (crc ^ *((u8 *)b)++) & 0xff ]; crc = (crc>>8) ^ crc32table_be[ (crc ^ *((u8 *)b)++) & 0xff ];
# else # else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment