summaryrefslogtreecommitdiff
path: root/src/stdlib/_rand.h
blob: 7f7102ef7700fc793eed7878f758999651b73b86 (plain)
1
2
3
4
#include <limits.h>

#define _rand(_n) \
	(((_n) = (_n) * 1103515245 + 12345) ? (_n) / UINT_MAX % RAND_MAX : 0)