Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
82171d6ac0d84876cdc6dd6319b0790b42cdb47e
/
.
/
src
/
prng
/
rand_r.c
blob: e96cfba99cdb9c8cb4b2c0d834389b864e857e23 [
file
] [
log
] [
blame
]
Rich Felker
0b44a03
2011-02-12 00:22:29 -0500
[
diff
] [
blame
]
1
#include
<stdlib.h>
2
3
int
rand_r
(
unsigned
*
seed
)
4
{
5
return
(*
seed
=
*
seed
*
1103515245
+
12345
)
&
0x7fffffff
;
6
}