mirror of
https://github.com/gityf/crc.git
synced 2026-08-12 20:32:20 +08:00
remove the call to 'labs' since unsigned values cannot be negative
This commit is contained in:
+2
-2
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user