fix unaligned mem for SIMD

This commit is contained in:
Laurent THOMAS
2022-02-18 09:41:18 +01:00
parent 18a421578f
commit 8e3f720b7d
10 changed files with 29 additions and 31 deletions
+2 -2
View File
@@ -72,10 +72,10 @@ unsigned int crcbit (unsigned char * inputptr,
unsigned int i, crc = 0, c;
while (octetlen-- > 0) {
c = (*inputptr++) << 24;
c = ((unsigned int)(*inputptr++)) << 24;
for (i = 8; i != 0; i--) {
if ((1 << 31) & (c ^ crc))
if ((1U << 31) & (c ^ crc))
crc = (crc << 1) ^ poly;
else
crc <<= 1;