about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-login.c2
-rw-r--r--src/ngircd/ngircd.c6
-rw-r--r--src/ngircd/proc.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index 2e99d66e..067703a8 100644
--- a/src/ngircd/irc-login.c
+++ b/src/ngircd/irc-login.c
@@ -273,7 +273,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
 
 #ifndef STRICT_RFC
 			if (Conf_AuthPing) {
-				Conn_SetAuthPing(Client_Conn(Client), random());
+				Conn_SetAuthPing(Client_Conn(Client), rand());
 				IRC_WriteStrClient(Client, "PING :%ld",
 					Conn_GetAuthPing(Client_Conn(Client)));
 				LogDebug("Connection %d: sent AUTH PING %ld ...",
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 58383cfa..500d1288 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -576,13 +576,13 @@ Random_Init_Kern(const char *file)
 		if (read(fd, &seed, sizeof(seed)) == sizeof(seed))
 			ret = true;
 		close(fd);
-		srandom(seed);
+		srand(seed);
 	}
 	return ret;
 }
 
 /**
- * Initialize libc random(3) number generator
+ * Initialize libc rand(3) number generator
  */
 static void
 Random_Init(void)
@@ -593,7 +593,7 @@ Random_Init(void)
 		return;
 	if (Random_Init_Kern("/dev/arandom"))
 		return;
-	srandom(random() ^ getpid() ^ time(NULL));
+	srand(rand() ^ getpid() ^ time(NULL));
 }
 
 
diff --git a/src/ngircd/proc.c b/src/ngircd/proc.c
index 217eb6d3..54b3919c 100644
--- a/src/ngircd/proc.c
+++ b/src/ngircd/proc.c
@@ -62,7 +62,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout
 		return -1;
 	}
 
-	seed = (unsigned int)random();
+	seed = (unsigned int)rand();
 	pid = fork();
 	switch (pid) {
 	case -1:
@@ -73,7 +73,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout
 		return -1;
 	case 0:
 		/* New child process: */
-		srandom(seed ^ (unsigned int)time(NULL) ^ getpid());
+		srand(seed ^ (unsigned int)time(NULL) ^ getpid());
 		Signals_Exit();
 		signal(SIGTERM, Proc_GenericSignalHandler);
 		signal(SIGALRM, Proc_GenericSignalHandler);