From 0ec89ae925aa63355a530f8b83b51914e8aa0756 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 23 Oct 2009 16:20:06 +0200 Subject: Use C99 type for byte in crc32.c --- crc32.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crc32.c b/crc32.c index 5d41211..4ee251a 100644 --- a/crc32.c +++ b/crc32.c @@ -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; } - -- cgit v1.2.3-54-g00ecf c='/cgit.png' alt='cgit logo'/> index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools/virtio/ringtest
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virtio/ringtest')