summaryrefslogtreecommitdiffstats
path: root/sys/crypto
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2013-07-11 16:27:11 +0000
committerandre <andre@FreeBSD.org>2013-07-11 16:27:11 +0000
commit01fc9682ceba9147939f8dd91391638682202b5a (patch)
treea8d5d387f2bd2f54b46cb2ff93ece782b0ebe9b4 /sys/crypto
parentfc2be30b217171175bae209edb4f697cc0cb542d (diff)
downloadFreeBSD-src-01fc9682ceba9147939f8dd91391638682202b5a.zip
FreeBSD-src-01fc9682ceba9147939f8dd91391638682202b5a.tar.gz
Fix const propagation issues to make GCC happy.
Submitted by: Michael Butler <imb@protected-networks.net>
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/siphash/siphash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/crypto/siphash/siphash.c b/sys/crypto/siphash/siphash.c
index 293396f..b1395d3 100644
--- a/sys/crypto/siphash/siphash.c
+++ b/sys/crypto/siphash/siphash.c
@@ -119,7 +119,8 @@ SipBuf(SIPHASH_CTX *ctx, const uint8_t **src, size_t len, int final)
void
SipHash_Update(SIPHASH_CTX *ctx, const void *src, size_t len)
{
- uint64_t m, *p;
+ uint64_t m;
+ const uint64_t *p;
const uint8_t *s;
size_t rem;
@@ -144,13 +145,13 @@ SipHash_Update(SIPHASH_CTX *ctx, const void *src, size_t len)
/* Optimze for 64bit aligned/unaligned access. */
if (((uintptr_t)s & 0x7) == 0) {
- for (p = (uint64_t *)s; len > 0; len--, p++) {
+ for (p = (const uint64_t *)s; len > 0; len--, p++) {
m = le64toh(*p);
ctx->v[3] ^= m;
SipRounds(ctx, 0);
ctx->v[0] ^= m;
}
- s = (uint8_t *)p;
+ s = (const uint8_t *)p;
} else {
for (; len > 0; len--, s += 8) {
m = le64dec(s);
OpenPOWER on IntegriCloud