diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2022-04-29 13:19:34 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2022-05-04 14:06:21 +0000 |
| commit | 8d20f1560d05ef4c96680cd1a0a0b9ac9054700f (patch) | |
| tree | 2c03e7626a0efdf345b81fe1ed6f9e46b66cfd54 /sys/cddl | |
| parent | 12905b7d50289633a58caf34ba77ff318ba4f0c2 (diff) | |
Diffstat (limited to 'sys/cddl')
| -rw-r--r-- | sys/cddl/boot/zfs/sha256.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/cddl/boot/zfs/sha256.c b/sys/cddl/boot/zfs/sha256.c index eee98e612a1e..2e1bfca0274f 100644 --- a/sys/cddl/boot/zfs/sha256.c +++ b/sys/cddl/boot/zfs/sha256.c @@ -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++) |
