summaryrefslogtreecommitdiff
path: root/src/util/rand_xor.c
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2017-03-21 19:35:22 +1100
committerTimothy Arceri <tarceri@itsqueeze.com>2017-03-23 08:16:29 +1100
commit6a9020f8dcedd7aa7abc3768d429ce17a6e7865a (patch)
tree47640f9e03fee3b6ff8dbe97123c784f325b2f2e /src/util/rand_xor.c
parentdd00a3c923ba94986efba2289c1b0e22b7c12c97 (diff)
util/disk_cache: use rand_xorshift128plus() to get our random int
Otherwise for apps that don't seed the regular rand() we will always remove old cache entries from the same dirs. V2: assume bits returned by rand are independent uniformly distributed bits and grab our hex value without taking the modulus of the whole value, this also fixes a bug where 'f' was always missing. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/util/rand_xor.c')
0 files changed, 0 insertions, 0 deletions