remove the call to 'labs' since unsigned values cannot be negative

This commit is contained in:
Wang Yaofu
2021-08-21 15:11:41 +08:00
committed by GitHub
parent 8045f50ba6
commit 8083fd4810
+2 -2
View File
@@ -74,5 +74,5 @@ uint32_t crc32(const char* s, int len)
crc32val = crc32_tab[(crc32val ^ s[i]) & 0xFF] ^ ((crc32val >> 8) & 0x00FFFFFF); crc32val = crc32_tab[(crc32val ^ s[i]) & 0xFF] ^ ((crc32val >> 8) & 0x00FFFFFF);
} }
return labs(crc32val ^ 0xFFFFFFFF); return crc32val ^ 0xFFFFFFFF;
} }