From 8dda0f671d5335f30a7cf4667ba0ffd9dbedf328 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 11 Jun 2013 12:25:43 +1000 Subject: [PATCH] remove unnecessary DE_CONST; pass in as (const void *) --- lib/isc/crc64.c | 6 ++---- lib/isc/include/isc/crc64.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/isc/crc64.c b/lib/isc/crc64.c index 8869a5cc0e..cfabc9800d 100644 --- a/lib/isc/crc64.c +++ b/lib/isc/crc64.c @@ -122,15 +122,13 @@ isc_crc64_init(isc_uint64_t *crc) { } void -isc_crc64_update(isc_uint64_t *crc, const isc_uint8_t *data, size_t len) { - unsigned char *p; +isc_crc64_update(isc_uint64_t *crc, const void *data, size_t len) { + const unsigned char *p = data; int i; REQUIRE(crc != NULL); REQUIRE(data != NULL); - DE_CONST(data, p); - while (len-- > 0) { i = ((int) (*crc >> 56) ^ *p++) & 0xff; *crc = crc64_table[i] ^ (*crc << 8); diff --git a/lib/isc/include/isc/crc64.h b/lib/isc/include/isc/crc64.h index 0403fec08e..18efb71923 100644 --- a/lib/isc/include/isc/crc64.h +++ b/lib/isc/include/isc/crc64.h @@ -36,7 +36,7 @@ isc_crc64_init(isc_uint64_t *crc); */ void -isc_crc64_update(isc_uint64_t *crc, const isc_uint8_t *data, size_t len); +isc_crc64_update(isc_uint64_t *crc, const void *data, size_t len); /*% * Add data to the CRC. *