diff options
Diffstat (limited to 'include/crc32.h')
-rw-r--r-- | include/crc32.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/include/crc32.h b/include/crc32.h index 4b51177..affa303 100644 --- a/include/crc32.h +++ b/include/crc32.h @@ -7,16 +7,7 @@ #include <stdint.h> -extern const uint32_t crc32_table[256]; - -/* Return a 32-bit CRC of the contents of the buffer. */ -static inline uint32_t crc32(uint32_t val, const void *ss, int len) -{ - const unsigned char *s = ss; - - while (--len >= 0) - val = crc32_table[(val ^ *s++) & 0xff] ^ (val >> 8); - return val; -} +/* Return a 32-bit CRC of the contents of the buffer */ +extern uint32_t crc32(uint32_t val, const void *ss, int len); #endif /* __CRC32_H__ */ |