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)
crc = __cpu_to_le32(crc);
/* Align it */
for ( ; ((u32)b)&3 && len ; len--){
for ( ; ((long)b)&3 && len ; len--){
# ifdef __LITTLE_ENDIAN
crc = (crc>>8) ^ crc32table_le[ (crc ^ *((u8 *)b)++) & 0xff ];
# else
......@@ -201,7 +201,7 @@ u32 attribute((pure)) crc32_be(u32 crc, unsigned char const *p, size_t len)
crc = __cpu_to_be32(crc);
/* Align it */
for ( ; ((u32)b)&3 && len ; len--){
for ( ; ((long)b)&3 && len ; len--){
# ifdef __LITTLE_ENDIAN
crc = (crc>>8) ^ crc32table_be[ (crc ^ *((u8 *)b)++) & 0xff ];
# 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