summaryrefslogtreecommitdiff
path: root/include/crc32.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-07-17 09:43:08 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-07-17 09:43:08 +0300
commit2d40ed7b415bcb6a358c9f221160c4a419f01f19 (patch)
tree15b61ca8fe52d9b472074910704c60f89c25f9d5 /include/crc32.h
parent74149643b934e2294e7878fbd2f180835f250e41 (diff)
libs: make crc32 and fec to be libraries
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include/crc32.h')
-rw-r--r--include/crc32.h13
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__ */