diff options
author | pfg <pfg@FreeBSD.org> | 2014-10-10 23:18:44 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-10-10 23:18:44 +0000 |
commit | e384592b57c8db7e176d49ea18582f5ebc6c365b (patch) | |
tree | dd2d486a0bc2a63d26e4050eb60d759e25882cd2 /contrib/one-true-awk/main.c | |
parent | 5595ee40038c5126db4f066c82af2fb2883d2946 (diff) | |
download | FreeBSD-src-e384592b57c8db7e176d49ea18582f5ebc6c365b.zip FreeBSD-src-e384592b57c8db7e176d49ea18582f5ebc6c365b.tar.gz |
MFC r271879:
awk: Use random(3) instead of rand(3)
While none of them is considered even near to cryptographic
level, random(3) is a better random generator than rand(3).
Use random(3) for awk as is done in other systems.
PR: 193147
Diffstat (limited to 'contrib/one-true-awk/main.c')
-rw-r--r-- | contrib/one-true-awk/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/one-true-awk/main.c b/contrib/one-true-awk/main.c index ab01676..ec70294 100644 --- a/contrib/one-true-awk/main.c +++ b/contrib/one-true-awk/main.c @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) signal(SIGFPE, fpecatch); srand_seed = 1; - srand(srand_seed); + srandom((unsigned long) srand_seed); yyin = NULL; symtab = makesymtab(NSYMTAB/NSYMTAB); |