Make 'junk' volatile so that compilers won't be tempted to optimize

Reviewed by:	ache
MFC after:	3 days
This commit is contained in:
kevlo 2012-08-17 01:05:56 +00:00
parent 79e5034b60
commit 8552821dd8

View File

@ -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);