diff options
-rw-r--r-- | crc32.c | 4 | ||||
-rw-r--r-- | crc32.h | 4 |
2 files changed, 5 insertions, 3 deletions
@@ -59,9 +59,9 @@ static const uint32_t crc32_table[256] = { 0x2d02ef8d }; -uint32_t crc32(uint32_t crc, uint8_t *buf, size_t len) +uint32_t crc32(uint32_t crc, const uint8_t *buf, size_t len) { - uint8_t *end; + const uint8_t *end; crc = ~crc; for (end = buf + len; buf < end; buf++) @@ -1,6 +1,8 @@ #ifndef _CRC32_H_ #define _CRC32_H_ -extern uint32_t crc32(uint32_t crc, unsigned char *buf, size_t len); +#include <stdint.h> + +extern uint32_t crc32(uint32_t crc, const uint8_t *buf, size_t len); #endif /* _CRC32_H_ */ |