[Mesa-dev] [PATCH 2/3] util/crc32: don't drop the const qualifier

Grazvydas Ignotas notasas at gmail.com
Fri Dec 29 01:56:37 UTC 2017


Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
 src/util/crc32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/crc32.c b/src/util/crc32.c
index 44d637c..f2e01c6 100644
--- a/src/util/crc32.c
+++ b/src/util/crc32.c
@@ -109,11 +109,11 @@ util_crc32_table[256] = {
  * @sa http://www.w3.org/TR/PNG/#D-CRCAppendix
  */
 uint32_t
 util_hash_crc32(const void *data, size_t size)
 {
-   uint8_t *p = (uint8_t *)data;
+   const uint8_t *p = data;
    uint32_t crc = 0xffffffff;
  
    while (size--)
       crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
    
-- 
2.7.4



More information about the mesa-dev mailing list