1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-26 09:51:53 +03:00

Move call to SHA256_Final outside of assert.

Signed-off-by: Ahmed Hesham <ahesham@outlook.com>
This commit is contained in:
Ahmed 2021-05-28 13:08:09 -07:00 committed by Ahmed Hesham
parent 215e7eda0a
commit 6829d465ea

3
icf.cc
View File

@ -115,7 +115,8 @@ static bool is_eligible(InputSection<E> &isec) {
static Digest digest_final(SHA256_CTX &sha) {
u8 buf[SHA256_SIZE];
assert(SHA256_Final(buf, &sha) == 1);
const int result = SHA256_Final(buf, &sha);
assert(result == 1);
Digest digest;
memcpy(digest.data(), buf, HASH_SIZE);