Skip to content

Commit

Permalink
Revert
Browse files Browse the repository at this point in the history
  • Loading branch information
pons committed May 14, 2019
1 parent 085fe3b commit 9e4ea64
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,14 @@ std::string Timer::getSeed(int size) {

#else

FILE *f = fopen("/dev/random","rb");
FILE *f = fopen("/dev/urandom","rb");
if(f==NULL) {
printf("Failed to open /dev/random %s\n", strerror( errno ));
printf("Failed to open /dev/urandom %s\n", strerror( errno ));
exit(1);
}
for (int i = 0; i < size; i++) {
if( fread(buff+i,1,1,f)!=1 ) {
printf("Failed to read from /dev/random %s\n", strerror( errno ));
exit(1);
}
if( fread(buff,1,size,f)!=size ) {
printf("Failed to read from /dev/urandom %s\n", strerror( errno ));
exit(1);
}
fclose(f);

Expand Down

0 comments on commit 9e4ea64

Please sign in to comment.