-const
authorChristian Grothoff <christian@grothoff.org>
Thu, 5 Jan 2012 22:34:11 +0000 (22:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 5 Jan 2012 22:34:11 +0000 (22:34 +0000)
src/util/crypto_crc.c

index bf8e058ad864b8ba242e19acacbcea4316464d9f..f86fe56969ba5785ccfc2ad1005253504c687506 100644 (file)
@@ -125,7 +125,7 @@ GNUNET_CRYPTO_crc32_n (const void *buf, size_t len)
 uint32_t
 GNUNET_CRYPTO_crc16_step (uint32_t sum, const void *buf, size_t len)
 {
-  uint16_t *hdr = buf;
+  const uint16_t *hdr = buf;
   for (; len >= 2; len -= 2)
     sum += *(hdr++);
   if (len == 1)
@@ -159,7 +159,7 @@ GNUNET_CRYPTO_crc16_finish (uint32_t sum)
 uint16_t
 GNUNET_CRYPTO_crc16_n (const void *buf, size_t len)
 {
-  uint16_t *hdr = buf;
+  const uint16_t *hdr = buf;
   uint32_t sum = GNUNET_CRYPTO_crc16_step (0, hdr, len);
 
   return GNUNET_CRYPTO_crc16_finish (sum);