summaryrefslogtreecommitdiffstats
path: root/src/util/rand_xor.c
Commit message (Collapse)AuthorAgeFilesLines
* util/rand_xor: add missing include statementsNicolas Dechesne2017-06-011-0/+1
| | | | | | | | | | | | | | Fixes for: src/util/rand_xor.c:60:13: error: implicit declaration of function 'open' [-Werror=implicit-function-declaration] int fd = open("/dev/urandom", O_RDONLY); ^~~~ src/util/rand_xor.c:60:34: error: 'O_RDONLY' undeclared (first use in this function) int fd = open("/dev/urandom", O_RDONLY); ^~~~~~~~ Signed-off-by: Nicolas Dechesne <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util/rand_xor: add function to seed randTimothy Arceri2017-03-231-0/+65
| | | | | | | | V2: pass the seed to the seed function so that we can isolate its uses. Stop leaking fd when urandom couldn't be read. Reviewed-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* util: move rand_xorshift128plus() to utilsTimothy Arceri2017-03-231-0/+20
V2: pass the seed to rand_xorshift128plus() so that we can isolate its uses. Reviewed-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>