Skip to content

Commit

Permalink
Fixes a const violation where atomicLoad erases const from the return…
Browse files Browse the repository at this point in the history
… value.
  • Loading branch information
TurkeyMan committed Aug 20, 2019
1 parent 86c75f9 commit bcdc91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/vibe/crypto/cryptorand.d
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ final class SystemRNG : RandomNumberStream {
version (linux) static if (LinuxMaybeHasGetrandom)
{
import core.atomic : atomicLoad, atomicStore;
auto p = atomicLoad(*cast(const shared GET_RANDOM*) &hasGetRandom);
GET_RANDOM p = atomicLoad(*cast(const shared GET_RANDOM*) &hasGetRandom);
if (p == GET_RANDOM.UNINITIALIZED)
{
p = initHasGetRandom() ? GET_RANDOM.AVAILABLE
Expand Down

0 comments on commit bcdc91e

Please sign in to comment.