diff options
author | midipix <writeonce@midipix.org> | 2015-12-17 05:03:44 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-12-17 05:03:44 -0500 |
commit | 6b803444af98e3e5273870551f59cc5f9dea5150 (patch) | |
tree | 8052fe3e0dddf2d68d4cf1e6932646f9dbacc168 | |
parent | 13a45a1cd8cc299158405760272a5f48c3f2644d (diff) | |
download | ntapi-6b803444af98e3e5273870551f59cc5f9dea5150.tar.bz2 ntapi-6b803444af98e3e5273870551f59cc5f9dea5150.tar.xz |
crc32 functions: add missing const qualifier.
-rw-r--r-- | src/hash/ntapi_tt_crc32.c | 12 |
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]; |