mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-21 19:48:54 -04:00
Fix reading from /dev/urandom for C library srand seed
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6293 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
bc3e565ef5
commit
906b2dba89
@ -30,7 +30,7 @@ void init_random_seed(void)
|
||||
|
||||
// try /dev/urandom for an initial seed
|
||||
int random_source;
|
||||
if (0 == (random_source = open ("/dev/urandom", O_RDONLY)))
|
||||
if ((random_source = open ("/dev/urandom", O_RDONLY)) >= 0)
|
||||
{
|
||||
size_t random_data_length = 0;
|
||||
have_seed = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user