Improve byte_data const correctness

This commit is contained in:
topjohnwu
2023-06-03 03:16:03 -07:00
parent 57afae3425
commit 2a654e5d7f
17 changed files with 186 additions and 161 deletions

View File

@ -159,8 +159,8 @@ int main(int argc, char *argv[]) {
unlink(DTB_FILE);
} else if (argc > 2 && action == "sha1") {
uint8_t sha1[SHA_DIGEST_SIZE];
auto m = mmap_data(argv[2]);
SHA_hash(m.buf, m.sz, sha1);
mmap_data m(argv[2]);
SHA_hash(m.buf(), m.sz(), sha1);
for (uint8_t i : sha1)
printf("%02x", i);
printf("\n");