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:
Bill Somerville 2015-12-18 15:14:38 +00:00
parent bc3e565ef5
commit 906b2dba89
1 changed files with 1 additions and 1 deletions

View File

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