diff options
author | Tobias Klauser <klto@zhaw.ch> | 2009-10-23 16:20:06 +0200 |
---|---|---|
committer | Tobias Klauser <klto@zhaw.ch> | 2009-10-23 16:20:06 +0200 |
commit | 0ec89ae925aa63355a530f8b83b51914e8aa0756 (patch) | |
tree | d9ddf3c7c8b3308cbb5c5ed7591144b70783c264 /crc32.c | |
parent | c5b2f669a1da34e43a1964cf24a6f22442cdcbba (diff) |
Use C99 type for byte in crc32.c
Diffstat (limited to 'crc32.c')
-rw-r--r-- | crc32.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -61,14 +61,13 @@ static const uint32_t crc32_table[256] = { 0x2d02ef8d }; -uint32_t crc32(uint32_t crc, unsigned char *buf, size_t len) +uint32_t crc32(uint32_t crc, uint8_t *buf, size_t len) { - unsigned char *end; + uint8_t *end; crc = ~crc; - for (end = buf + len; buf < end; ++buf) + for (end = buf + len; buf < end; buf++) crc = crc32_table[(crc ^ *buf) & BIT_MASK(8)] ^ (crc >> 8); return ~crc; } - |