mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 11:23:26 +01:00
unit_tests: Fix uninitialized values
- Initialize the `hash` in the `get_block_hash()` function of the `output_distribution` unit test explicitly, to silence `valgrind` warnings.
This commit is contained in:
parent
cdfa2e58df
commit
f56e160217
@ -93,7 +93,7 @@ bool get_output_distribution(uint64_t amount, uint64_t from, uint64_t to, uint64
|
|||||||
|
|
||||||
crypto::hash get_block_hash(uint64_t height)
|
crypto::hash get_block_hash(uint64_t height)
|
||||||
{
|
{
|
||||||
crypto::hash hash;
|
crypto::hash hash = crypto::null_hash;
|
||||||
*((uint64_t*)&hash) = height;
|
*((uint64_t*)&hash) = height;
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user