Commit Diff


commit - 5acb90fafc9dea012967751fb6a5c7847da1820a
commit + e70e81460b99d6b00cb6d13d7ce7537dcd4965f8
blob - 557543c26c2385941b3c0ce8f75031398d66f0e8
blob + 217eb6d3ba17a3d22613caabfb2662e6c9f4cccc
--- src/ngircd/proc.c
+++ src/ngircd/proc.c
@@ -62,7 +62,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc
 		return -1;
 	}
 
-	seed = random();
+	seed = (unsigned int)random();
 	pid = fork();
 	switch (pid) {
 	case -1:
@@ -73,7 +73,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc
 		return -1;
 	case 0:
 		/* New child process: */
-		srandom(seed ^ time(NULL) ^ getpid());
+		srandom(seed ^ (unsigned int)time(NULL) ^ getpid());
 		Signals_Exit();
 		signal(SIGTERM, Proc_GenericSignalHandler);
 		signal(SIGALRM, Proc_GenericSignalHandler);