Replace variable arrays in tests with VARIABLE_ARRAY
This commit is contained in:
parent
d6fd11413e
commit
f41f143668
@ -64,8 +64,8 @@ hash_variant_verify(hash_variant_t variant)
|
||||
{
|
||||
const size_t hashbytes = hash_variant_bits(variant) / 8;
|
||||
uint8_t key[256];
|
||||
uint8_t hashes[hashbytes * 256];
|
||||
uint8_t final[hashbytes];
|
||||
VARIABLE_ARRAY(uint8_t, hashes, hashbytes * 256);
|
||||
VARIABLE_ARRAY(uint8_t, final, hashbytes);
|
||||
unsigned i;
|
||||
uint32_t computed, expected;
|
||||
|
||||
|
@ -285,7 +285,7 @@ TEST_BEGIN(test_arenas_initialized)
|
||||
assert_d_eq(mallctl("arenas.narenas", &narenas, &sz, NULL, 0), 0,
|
||||
"Unexpected mallctl() failure");
|
||||
{
|
||||
bool initialized[narenas];
|
||||
VARIABLE_ARRAY(bool, initialized, narenas);
|
||||
|
||||
sz = narenas * sizeof(bool);
|
||||
assert_d_eq(mallctl("arenas.initialized", initialized, &sz,
|
||||
|
Loading…
Reference in New Issue
Block a user