[Mesa-dev] [PATCH v2 1/3] util/crc32: don't drop the const qualifier
Ian Romanick
idr at freedesktop.org
Thu Jan 11 01:25:39 UTC 2018
Patches 1 and 3 are
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 01/09/2018 02:58 PM, Grazvydas Ignotas wrote:
> 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);
>
More information about the mesa-dev
mailing list