Make 'junk' volatile so that compilers won't be tempted to optimize
Reviewed by: ache MFC after: 3 days
This commit is contained in:
parent
e682d02e12
commit
8437339e10
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239345
@ -315,7 +315,7 @@ srandomdev()
|
||||
|
||||
if (!done) {
|
||||
struct timeval tv;
|
||||
unsigned long junk;
|
||||
volatile unsigned long junk;
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
|
||||
|
Loading…
Reference in New Issue
Block a user