[Olsr-dev] [PATCH v1 08/43] random: remove pointless olsr_init_random, only invoked in main

Ferry Huberts (spam-protected)
Wed Nov 11 17:21:41 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/main.c        | 2 +-
 src/olsr_random.h | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/main.c b/src/main.c
index 457e055..eb632b2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -306,7 +306,7 @@ int main(int argc, char *argv[]) {
   setbuf(stderr, NULL);
 
   /* setup random seed */
-  olsr_init_random();
+  srandom(time(NULL));
 
   /* Init widely used statics */
   memset(&all_zero, 0, sizeof(union olsr_ip_addr));
diff --git a/src/olsr_random.h b/src/olsr_random.h
index 5c85e45..f142c3b 100644
--- a/src/olsr_random.h
+++ b/src/olsr_random.h
@@ -33,8 +33,4 @@ static inline long int olsr_random(void) {
   return abs(value);
 }
 
-static inline void olsr_init_random(void) {
-  srandom(time(NULL));
-}
-
 #endif /* _OLSR_RANDOM_H */
-- 
2.5.0




More information about the Olsr-dev mailing list