diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2018-10-20 20:49:37 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2018-10-20 20:49:37 +0000 |
commit | b0dee75e6460644cb00f57245a3e797626a0083f (patch) | |
tree | 28347cbccf42c2a88f4291593c0b37d0ee499483 /gnu | |
parent | e41793db2c6a9681804c0dec29e6bd0b42667ec2 (diff) | |
download | src-test2-b0dee75e6460644cb00f57245a3e797626a0083f.tar.gz src-test2-b0dee75e6460644cb00f57245a3e797626a0083f.zip |
random(4): Translate a comment requirement into a compile-time invariant
In various places, random represents the set of sources as a 32-bit word
bitmask. It assumes all sources fit within this, i.e., the maximum valid
source number is 31.
There was a comment specifying this limitation, but we can actually refuse
to compile if our assumption is violated instead. We still have a few spare
random source slots, but sooner or later someone may need to convert the
masks used from raw 32-bit words to bitset(9) APIs.
This prevents some kinds of developer foot-shooting when adding new random
sources. No functional change.
Reviewed by: delphij, markm
Approved by: secteam (delphij)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D16982
Notes
Notes:
svn path=/head/; revision=339487
Diffstat (limited to 'gnu')
0 files changed, 0 insertions, 0 deletions