diff options
| author | Andre Oppermann <andre@FreeBSD.org> | 2013-07-11 16:27:11 +0000 |
|---|---|---|
| committer | Andre Oppermann <andre@FreeBSD.org> | 2013-07-11 16:27:11 +0000 |
| commit | bf0354c0f29c4627b125b06625a7ff6d52ccd1a0 (patch) | |
| tree | a8d5d387f2bd2f54b46cb2ff93ece782b0ebe9b4 /sys/crypto | |
| parent | 81d392a09de0f2eeabaf68787896863eb9c370a8 (diff) | |
Notes
Diffstat (limited to 'sys/crypto')
| -rw-r--r-- | sys/crypto/siphash/siphash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/crypto/siphash/siphash.c b/sys/crypto/siphash/siphash.c index 293396f5a3d7..b1395d37a052 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); |
