Quagga: Fix code to use srandom/random
Quagga was using a mix of srand/rand and srandom/random.
Consolidate to use srandom/random which are the POSIX
versions of random number generators
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 4a7f52f..97a1392 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1936,7 +1936,7 @@
static int
ripng_update_jitter (int time)
{
- return ((rand () % (time + 1)) - (time / 2));
+ return ((random () % (time + 1)) - (time / 2));
}
void
@@ -3084,7 +3084,7 @@
ripng_init ()
{
/* Randomize. */
- srand (time (NULL));
+ srandom (time (NULL));
/* Install RIPNG_NODE. */
install_node (&cmd_ripng_node, ripng_config_write);