X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fprng%2Frandom.c;h=13a5e6df5f650d12802c589f0e5f49122a870625;hb=ebb6afde680fc420f85a124d548831d59650b611;hp=e250e28e98919eca4f3c9e880b9de54ba23d2fd5;hpb=1569f396bb76e9d54f6c4492ed6778e37b87bc70;p=musl diff --git a/src/prng/random.c b/src/prng/random.c index e250e28e..13a5e6df 100644 --- a/src/prng/random.c +++ b/src/prng/random.c @@ -22,7 +22,7 @@ static int n = 31; static int i = 3; static int j = 0; static uint32_t *x = init+1; -static int lock[2]; +static volatile int lock[1]; static uint32_t lcg31(uint32_t x) { return (1103515245*x + 12345) & 0x7fffffff;