mirror of
https://github.com/opnsense/src.git
synced 2026-05-19 08:25:22 -04:00
stand/zfs: Fix const-qual warnings
The input buffer is read-only, update casts to match.
No functional change intended.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 8d20f1560d)
This commit is contained in:
parent
1db9d7b775
commit
2baed7fc24
1 changed files with 4 additions and 4 deletions
|
|
@ -203,11 +203,11 @@ SHA256(uint32_t *H, const void *buf, uint64_t size, zio_cksum_t *zcp)
|
|||
|
||||
/* process all blocks up to the last one */
|
||||
for (i = 0; i < size - padsize; i += 64)
|
||||
SHA256Transform(H, (uint8_t *)buf + i);
|
||||
SHA256Transform(H, (const uint8_t *)buf + i);
|
||||
|
||||
/* process the last block and padding */
|
||||
for (k = 0; k < padsize; k++)
|
||||
pad[k] = ((uint8_t *)buf)[k+i];
|
||||
pad[k] = ((const uint8_t *)buf)[k + i];
|
||||
|
||||
for (pad[padsize++] = 0x80; (padsize & 63) != 56; padsize++)
|
||||
pad[padsize] = 0;
|
||||
|
|
@ -259,11 +259,11 @@ SHA512(uint64_t *H, const void *buf, uint64_t size, zio_cksum_t *zcp)
|
|||
|
||||
/* process all blocks up to the last one */
|
||||
for (i = 0; i < size - padsize; i += 128)
|
||||
SHA512Transform(H, (uint8_t *)buf + i);
|
||||
SHA512Transform(H, (const uint8_t *)buf + i);
|
||||
|
||||
/* process the last block and padding */
|
||||
for (k = 0; k < padsize; k++)
|
||||
pad[k] = ((uint8_t *)buf)[k+i];
|
||||
pad[k] = ((const uint8_t *)buf)[k + i];
|
||||
|
||||
if (padsize < 112) {
|
||||
for (pad[padsize++] = 0x80; padsize < 112; padsize++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue