summaryrefslogtreecommitdiff
path: root/src/common/random.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-27 15:00:54 -0200
committershennetsind <ind@henn.et>2013-10-27 15:00:54 -0200
commita1c3a358aefa46b37e6745f9c54cc6df14ea6ba4 (patch)
tree200bfbff424724d1c324527359fce2c96c957957 /src/common/random.c
parentbaef78f7954fa4e6fa2449f2c7de92a901c7f5f3 (diff)
parente6a1225802e01ad5390c033ca7a4653c1a976c24 (diff)
downloadhercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.gz
hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.bz2
hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.tar.xz
hercules-a1c3a358aefa46b37e6745f9c54cc6df14ea6ba4.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/common/random.c')
-rw-r--r--src/common/random.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/random.c b/src/common/random.c
index 2f1b62934..e46c52cad 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -17,17 +17,17 @@
/// Initializes the random number generator with an appropriate seed.
void rnd_init(void)
{
- uint32 seed = timer->gettick();
- seed += (uint32)time(NULL);
+ unsigned long seed = (unsigned long)timer->gettick();
+ seed += (unsigned long)time(NULL);
#if defined(WIN32)
- seed += GetCurrentProcessId();
- seed += GetCurrentThreadId();
+ seed += (unsigned long)GetCurrentProcessId();
+ seed += (unsigned long)GetCurrentThreadId();
#else
#if defined(HAVE_GETPID)
- seed += (uint32)getpid();
+ seed += (unsigned long)getpid();
#endif // HAVE_GETPID
#if defined(HAVE_GETTID)
- seed += (uint32)gettid();
+ seed += (unsigned long)gettid();
#endif // HAVE_GETTID
#endif
init_genrand(seed);