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/ripd/ripd.c b/ripd/ripd.c
index 9d355ec..b42ca72 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -2859,7 +2859,7 @@
if (jitter_input < JITTER_BOUND)
jitter_input = JITTER_BOUND;
- jitter = (((rand () % ((jitter_input * 2) + 1)) - jitter_input));
+ jitter = (((random () % ((jitter_input * 2) + 1)) - jitter_input));
return jitter/JITTER_BOUND;
}
@@ -4132,7 +4132,7 @@
rip_init (void)
{
/* Randomize for triggered update random(). */
- srand (time (NULL));
+ srandom (time (NULL));
/* Install top nodes. */
install_node (&rip_node, config_write_rip);