From 8083fd48108b367d3382368837a8e0f7d25d8a2e Mon Sep 17 00:00:00 2001 From: Wang Yaofu Date: Sat, 21 Aug 2021 15:11:41 +0800 Subject: [PATCH] remove the call to 'labs' since unsigned values cannot be negative --- crc/crc32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crc/crc32.c b/crc/crc32.c index 71ca1b6..4c21054 100644 --- a/crc/crc32.c +++ b/crc/crc32.c @@ -74,5 +74,5 @@ uint32_t crc32(const char* s, int len) crc32val = crc32_tab[(crc32val ^ s[i]) & 0xFF] ^ ((crc32val >> 8) & 0x00FFFFFF); } - return labs(crc32val ^ 0xFFFFFFFF); -} \ No newline at end of file + return crc32val ^ 0xFFFFFFFF; +}