about summary refs log tree commit diff
path: root/src/prng/rand_r.c
blob: e96cfba99cdb9c8cb4b2c0d834389b864e857e23 (plain) (blame)
1
2
3
4
5
6
#include <stdlib.h>

int rand_r(unsigned *seed)
{
	return (*seed = *seed * 1103515245 + 12345) & 0x7fffffff;
}