summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hash/ntapi_tt_crc32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hash/ntapi_tt_crc32.c b/src/hash/ntapi_tt_crc32.c
index 7ce25d3..14839fa 100644
--- a/src/hash/ntapi_tt_crc32.c
+++ b/src/hash/ntapi_tt_crc32.c
@@ -14,11 +14,11 @@ uint32_t __ntapi_tt_buffer_crc32(
const void * buffer,
size_t size)
{
- unsigned char * ch;
- uint32_t crc32;
+ const unsigned char * ch;
+ uint32_t crc32;
crc32 = prev_hash ^ 0xFFFFFFFF;
- ch = (unsigned char *)buffer;
+ ch = buffer;
for (; size; size--,ch++)
crc32 = (crc32 >> 8) ^ crc32_table[(crc32 ^ *ch) & 0xFF];
@@ -29,11 +29,11 @@ uint32_t __ntapi_tt_buffer_crc32(
uint32_t __cdecl __ntapi_tt_mbstr_crc32(const void * str)
{
- uint32_t crc32;
- unsigned char * ch;
+ const unsigned char * ch;
+ uint32_t crc32;
crc32 = 0 ^ 0xFFFFFFFF;
- ch = (unsigned char *)str;
+ ch = str;
while (*ch) {
crc32 = (crc32 >> 8) ^ crc32_table[(crc32 ^ *ch) & 0xFF];