random(4): Correct a bare zero to the appropriate enum
The convention for updating hc_destination[] is to index with a random_entropy_source. Zero happens to match RANDOM_CACHED, which is correct for this source (early random data). Spell the zero value as the enum name instead of the magic constant. No functional change. Reviewed by: delphij, markm Approved by: secteam (delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16983
This commit is contained in:
parent
54ad919e31
commit
6f68fd4705
@ -414,7 +414,8 @@ random_harvestq_prime(void *unused __unused)
|
||||
event.he_somecounter = (uint32_t)get_cyclecount();
|
||||
event.he_size = count;
|
||||
event.he_source = RANDOM_CACHED;
|
||||
event.he_destination = harvest_context.hc_destination[0]++;
|
||||
event.he_destination =
|
||||
harvest_context.hc_destination[RANDOM_CACHED]++;
|
||||
memcpy(event.he_entropy, data + i, sizeof(event.he_entropy));
|
||||
random_harvestq_fast_process_event(&event);
|
||||
explicit_bzero(&event, sizeof(event));
|
||||
|
Loading…
Reference in New Issue
Block a user