commit | aa8bbc12ddcb134defd9a0216cf15de00d3a5e5a | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Mar 08 18:01:10 2020 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Sun Mar 08 18:04:16 2020 +0100 |
tree | 7fefec81f873900ee586c9db55efe68888c80dc4 | |
parent | 5a6d3e797edc7ac52560cc1a5bd90a984b6b350b [diff] |
MINOR: sample: make all bits random on the rand() sample fetch The rand() sample fetch supports being limited to a certain range, but it only uses 31 bits and scales them as requested, which means that when the requested output range is larger than 31 bits, the least significant one is not random and may even be constant. Let's make use of the whole 32 bits now that we have access ot them.