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
79e5034b60
commit
8552821dd8
@ -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