Skip to content

Commit

Permalink
Seed srandom() with a more varied seed.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Aug 24, 2011
1 parent fdfd49d commit 2ff2c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythbase/mythcorecontext.cpp
Expand Up @@ -96,8 +96,8 @@ MythCoreContextPrivate::MythCoreContextPrivate(MythCoreContext *lparent,
m_scheduler(NULL)
{
threadRegister("CoreContext");
// start our pseudo-random generator in one of 1000 states.
srandom(QTime::currentTime().msec());
srandom(QDateTime::currentDateTime().toTime_t() ^
QTime::currentTime().msec());
}

MythCoreContextPrivate::~MythCoreContextPrivate()
Expand Down

0 comments on commit 2ff2c86

Please sign in to comment.