773 |
|
SSL_library_init(); |
774 |
|
|
775 |
|
#ifndef _urandomdev_ |
776 |
< |
int pid = getpid(); |
777 |
< |
int now = time(NULL); |
778 |
< |
|
779 |
< |
unsigned seed = now > pid ? now - pid : pid - now; |
780 |
< |
|
776 |
> |
int pid(getpid()), now(time(NULL)); |
777 |
> |
unsigned seed(now > pid ? now - pid : pid - now); |
778 |
|
char* junk = new char[seed % 30 + 2]; |
779 |
+ |
|
780 |
|
junk[0] = pid; |
781 |
|
junk[seed % 30 + 1] = now; |
782 |
|
|
783 |
|
srand(seed); |
784 |
|
|
785 |
< |
for (int index = 1; index < seed % 30 + 1; index++) |
785 |
> |
for (size_t index = 1; index < seed % 30 + 1; index++) |
786 |
|
{ |
787 |
|
junk[index] = rand(); |
788 |
|
} |
791 |
|
{ |
792 |
|
cerr << "junk = {\n"; |
793 |
|
|
794 |
< |
for (int index = 1; index < seed % 30 + 2; index++) |
794 |
> |
for (size_t index = 1; index < seed % 30 + 2; index++) |
795 |
|
{ |
796 |
< |
cerr << " [" << index << "] = " << int(junk[index]) << "\n"; |
796 |
> |
cerr << " [" << index << "] = " << unsigned(junk[index]) << "\n"; |
797 |
|
} |
798 |
|
|
799 |
|
cerr << "}\n"; |