From 2d40ed7b415bcb6a358c9f221160c4a419f01f19 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Sat, 17 Jul 2010 09:43:08 +0300 Subject: libs: make crc32 and fec to be libraries Signed-off-by: Artem Bityutskiy --- include/crc32.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'include/crc32.h') 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 -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__ */ -- cgit v1.2.3