diff options
Diffstat (limited to 'firmware/common/crc32.c')
-rw-r--r-- | firmware/common/crc32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/common/crc32.c b/firmware/common/crc32.c index 18ee6ac710..21fefac07f 100644 --- a/firmware/common/crc32.c +++ b/firmware/common/crc32.c | |||
@@ -21,8 +21,10 @@ | |||
21 | 21 | ||
22 | /* Tool function to calculate a CRC32 across some buffer */ | 22 | /* Tool function to calculate a CRC32 across some buffer */ |
23 | /* third argument is either 0xFFFFFFFF to start or value from last piece */ | 23 | /* third argument is either 0xFFFFFFFF to start or value from last piece */ |
24 | unsigned crc_32(unsigned char* buf, unsigned len, unsigned crc32) | 24 | unsigned crc_32(const void *src, unsigned len, unsigned crc32) |
25 | { | 25 | { |
26 | const unsigned char *buf = (const unsigned char *)src; | ||
27 | |||
26 | /* CCITT standard polynomial 0x04C11DB7 */ | 28 | /* CCITT standard polynomial 0x04C11DB7 */ |
27 | static const unsigned crc32_lookup[16] = | 29 | static const unsigned crc32_lookup[16] = |
28 | { /* lookup table for 4 bits at a time is affordable */ | 30 | { /* lookup table for 4 bits at a time is affordable */ |