summaryrefslogtreecommitdiff
path: root/src/prng/rand_r.c
blob: ef26dbde6b673e27ebdf65189680559733cb01f0 (plain)
1
2
3
4
5
6
#include <stdlib.h>

int rand_r(unsigned *seed)
{
	return (*seed = *seed * 1103515245 + 12345)/2;
}