1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Make the AES availability cache actually cache things!

Ahem. I went to all the effort of setting up a wrapper function that
would store the result of the first call to aes_hw_available(), and
managed to forget to make it set the flag that said it _had_ stored
the result. So the underlying query function was being called every
time.
This commit is contained in:
Simon Tatham 2019-01-15 22:45:53 +00:00
parent 85633ac4bd
commit 5ac7cdb1cb

View File

@ -134,8 +134,10 @@ static bool aes_hw_available_cached(void)
{
static bool initialised = false;
static bool hw_available;
if (!initialised)
if (!initialised) {
hw_available = aes_hw_available();
initialised = true;
}
return hw_available;
}