summaryrefslogtreecommitdiffstats
path: root/src/zix
diff options
context:
space:
mode:
Diffstat (limited to 'src/zix')
-rw-r--r--src/zix/digest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zix/digest.c b/src/zix/digest.c
index 04f48f0..7d9c035 100644
--- a/src/zix/digest.c
+++ b/src/zix/digest.c
@@ -1,5 +1,5 @@
/*
- Copyright 2012 David Robillard <http://drobilla.net>
+ Copyright 2012-2014 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -37,15 +37,15 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len)
#ifdef __SSE4_2__
// SSE 4.2 CRC32
for (size_t i = 0; i < (len / sizeof(uint32_t)); ++i) {
- hash = _mm_crc32_u32(hash, *(uint32_t*)str);
+ hash = _mm_crc32_u32(hash, *(const uint32_t*)str);
str += sizeof(uint32_t);
}
if (len & sizeof(uint16_t)) {
- hash = _mm_crc32_u16(hash, *(uint16_t*)str);
+ hash = _mm_crc32_u16(hash, *(const uint16_t*)str);
str += sizeof(uint16_t);
}
if (len & sizeof(uint8_t)) {
- hash = _mm_crc32_u8(hash, *(uint8_t*)str);
+ hash = _mm_crc32_u8(hash, *(const uint8_t*)str);
}
#else
// Classic DJB hash