From d78c1c381449ff9668d192ea8042ea5394dd1cd9 Mon Sep 17 00:00:00 2001 From: nils-ohlmeier Date: Mon, 6 Nov 2006 06:04:21 +0000 Subject: [PATCH] improved srand initialization according to perl docs. thnks to dsemyonov. closes #8289 git-svn-id: http://svn.berlios.de/svnroot/repos/sipsak/trunk@412 75b5f7c7-cfd4-0310-b54c-e118b2c5249a (cherry picked from commit ccb01c74cb4f5b2ddfaf282511fc313433d42eef) (cherry picked from commit 7a454d589551c23e346dc41d68a07b2ad6d19593) --- sipsak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sipsak.c b/sipsak.c index b85c6d1..ef7efba 100644 --- a/sipsak.c +++ b/sipsak.c @@ -902,7 +902,7 @@ int main(int argc, char *argv[]) /* this is not a cryptographic random number generator, but hey this is only a test-tool => should be satisfying*/ - srand(time(0) ^ getpid()); + srand(time(0) ^ (getpid() + (getpid() << 15))); if (processes > 1) { if (signal(SIGCHLD , sigchld_handler) == SIG_ERR ) {