Преглед изворни кода

core: code formatting fixes related to commit 300da5c5a1

Henning Westerholt пре 1 месец
родитељ
комит
57b047bc6a
3 измењених фајлова са 9 додато и 6 уклоњено
  1. 5 4
      src/core/pt.c
  2. 2 1
      src/core/rand/cryptorand.c
  3. 2 1
      src/core/rand/fortuna/fortuna.c

+ 5 - 4
src/core/pt.c

@@ -296,16 +296,17 @@ int fork_process(int child_id, char *desc, int make_sock)
 		close_extra_socks(child_id, process_no);
 #endif /* USE_TCP */
 
-		if (cryptorand_init() != 0) {
-			LM_ERR("Could not initalized cryptographic random number generator\n");
+		if(cryptorand_init() != 0) {
+			LM_ERR("Could not initalized cryptographic random number "
+				   "generator\n");
 			return -1;
 		}
 		kam_srand(cryptorand());
 		fastrand_seed(cryptorand());
 		srandom(cryptorand());
 		LM_DBG("test random number generators - kam_rand: %u, random: %lu, "
-			"fastrand %u, cryptorand %u\n",
-			kam_rand(), random(), fastrand(), cryptorand());
+			   "fastrand %u, cryptorand %u\n",
+				kam_rand(), random(), fastrand(), cryptorand());
 
 		shm_malloc_on_fork();
 #ifdef PROFILING

+ 2 - 1
src/core/rand/cryptorand.c

@@ -53,6 +53,7 @@ unsigned int cryptorand(void)
 	return result;
 }
 
-unsigned int cryptorand_init(void) {
+unsigned int cryptorand_init(void)
+{
 	return sr_init_cryptorand();
 }

+ 2 - 1
src/core/rand/fortuna/fortuna.c

@@ -413,7 +413,8 @@ static void extract_data(FState *st, unsigned count, u_int8_t *dst)
 FState main_state;
 int init_done = 0;
 
-void fortuna_add_entropy(const u_int8_t *data, unsigned len, unsigned force_init)
+void fortuna_add_entropy(
+		const u_int8_t *data, unsigned len, unsigned force_init)
 {
 	if(!init_done || force_init) {
 		init_state(&main_state);